4d – Program Design Lingma Acheson CSCI N331 VB .NET Programming

Slides:



Advertisements
Similar presentations
An Introduction to Visual Basic Terms & Concepts.
Advertisements

PROBLEM SOLVING TECHNIQUES
Chapter 6: The Repetition Structure
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
7 – Arrays Lingma Acheson Department of Computer and Information Science, IUPUI CSCI N331 VB.NET Programming.
Developing Software Applications Introduction to Programming Fundamentals Scoping in VB Simple Ifs in VB.
Algorithms. Introduction Before writing a program: –Have a thorough understanding of the problem –Carefully plan an approach for solving it While writing.
Copyright © 2001 by Wiley. All rights reserved. Chapter 1: Introduction to Programming and Visual Basic Computer Operations What is Programming? OOED Programming.
1b – Inside Visual Studio Lingma Acheson Department of Computer and Information Science, IUPUI CSCI N331 VB.NET Programming.
ALGORITHMS AND FLOWCHARTS
Visual Basic Fundamental Concepts. Integrated Development Enviroment Generates startup form for new project on which to place controls. Features toolbox.
CS 0004 –Lecture 8 Jan 24, 2011 Roxana Gheorghiu.
Learning Objectives Data and Information Six Basic Operations Computer Operations Programs and Programming What is Programming? Types of Languages Levels.
Mastering Char to ASCII AND DOING MORE RELATED STRING MANIPULATION Why VB.Net ?  The Language resembles Pseudocode - good for teaching and learning fundamentals.
Visual Basic.NET BASICS Lesson 4 Mathematical Operators.
3 - Variables Lingma Acheson Department of Computer and Information Science, IUPUI CSCI N331 VB.NET Programming.
Chapter 4 Variables and constants. 4.1 Variables -Use of variables is good programming style -easier to modify -easier for a programmer to understand.
Programming with Visual C++: Concepts and Projects Chapter 2B: Reading, Processing and Displaying Data (Tutorial)
9c. Line Charts CSCI N207 Data Analysis Using Spreadsheet Department of Computer and Information Science, IUPUI Lingma Acheson
ALGORITHMS AND FLOWCHARTS CSCI 105 – Computer Fluency.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Class Average Application Introducing the Do...Loop While and Do...Loop Until.
Variables When programming it is often necessary to store a value for use later on in the program. A variable is a label given to a location in memory.
Data Types and Variables. Data Type! Computers are all about Data! Data can be in the form of Text Dates Sounds Pictures.
6c – Function Procedures Lingma Acheson Department of Computer and Information Science, IUPUI CSCI N331 VB.NET Programming.
Graphical User Interface You will be used to using programs that have a graphical user interface (GUI). So far you have been writing programs that have.
Chapter One An Introduction to Programming and Visual Basic.
Chapter 4 Variables and constants. 4.1 Variables -Use of variables is good programming style -easier to modify -easier for a programmer to understand.
2a – Object Oriented Lingma Acheson Department of Computer and Information Science, IUPUI CSCI N331 VB.NET Programming.
2d – CheckBox Lingma Acheson Department of Computer and Information Science, IUPUI CSCI N331 VB.NET Programming.
Intermediate 2 Computing Unit 2 - Software Development.
2e – RadioButtons Lingma Acheson Department of Computer and Information Science, IUPUI CSCI N331 VB.NET Programming.
6b – Sub Procedure With Parameters Lingma Acheson Department of Computer and Information Science, IUPUI CSCI N331 VB.NET Programming.
T U T O R I A L  2009 Pearson Education, Inc. All rights reserved Student Grades Application Introducing Two-Dimensional Arrays and RadioButton.
2c – Textboxes and Buttons Lingma Acheson Department of Computer and Information Science, IUPUI CSCI N331 VB.NET Programming.
Calculator Program Explained by Arafa Hamed. First Designing The Interface Ask yourself how many places are there that will be used to input numbers?
مقدمة في البرمجة Lecture 7. Write VB.net project using the for loop to calculate : 1- the sum of numbers from 1 to (A) numbers. 2- the sum of Odd numbers.
5b – For Loops Lingma Acheson Department of Computer and Information Science, IUPUI CSCI N331 VB.NET Programming.
MIT App Inventor Lesson 3 Algorithms Variables Procedures.
CMSC 2021 Software Development. CMSC 2022 Software Development Life Cycle Five phases: –Analysis –Design –Implementation –Testing –Maintenance.
Adding Code to the Option Button. Open VB 1.Double click the Calculate button and select General from the Object list box. 2.Add the following code to.
Data and variables in Visual Basic. Annoucement Lecture on Thursday 7:30PM C106 Visual Basic download: 
Knowledge Base. Defining a Variable Dim statement Dim intXX As Integer Public in a Module Public dblNN As Double.
Visual Basic 6 Programming Decide how many variables you need by looking at this form. There is one textbox for input and there are 3 labels for output,
How Computers Solve Problems Computers also use Algorithms to solve problems, and change data into information Computers can only perform one simple step.
Visual Basic/ Visual Studio Brandon Large. Connecting to prior knowledge In your notes write down what the two main parts of the computer are. The “software”
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
Visual Basic Fundamental Concepts
GC101 Introduction to computers and programs
Introduction to Programming and Visual Basic
Programming constructs
Introduction to Visual Basic 2008 Programming
Chapter 8: Writing Graphical User Interfaces
Visual Basic I Programming
Tutorial 10 – Class Average Application Introducing the Do…Loop While and Do…Loop Until Repetition Statements Outline Test-Driving the Class Average.
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
An Introduction to Programming and VB.NET
An Introduction to Visual Basic
ALGORITHMS AND FLOWCHARTS
Variables and Arithmetic Operations
Visual Basic..
ALGORITHMS AND FLOWCHARTS
Chapter One: An Introduction to Programming and Visual Basic
Introduction to Programming
Programming Concepts and Database
2g – ComboBox Lingma Acheson CSCI N331 VB .NET Programming
7 – Variables, Input and Output
4 – History of Programming Languages
2b – Labels and Pictures Lingma Acheson CSCI N331 VB .NET Programming
4a- If And Else Lingma Acheson CSCI N331 VB .NET Programming
Presentation transcript:

4d – Program Design Lingma Acheson CSCI N331 VB .NET Programming Department of Computer and Information Science, IUPUI

Pseudocode Half English, half programming language to aid in program design E.g. If the score is greater than 90Then letter grade is A End IF Translated to real code: If intScore > 90 Then strGrade = “A”

Problem Solving Phase one – understand the problem Read and study the requirements Phase two – program design Develop a plan Phase three – program implementation Translate the design into actual code Phase four – program testing Run the program and test with different inputs Phase five – program documentation Document technical details, user manuals, etc.

Program Design Must have a plan before you start coding! Think through the whole program without using a computer. With a plan, coding is simply straightforward translation. A five step process Initialization Input Processing Output Clean up

Program Design Calculator example Expand each step if necessary Initialization: None Input: 2 numbers and 1 operation Processing: Take the two inputs and perform the operation Output: Tell user the result from operation Clean up: None Expand each step if necessary How to take two numbers? Create 2 textboxes. How to provide operators? buttons, radio buttons, or combo boxes? Create a submit button and use button event to take the two inputs and perform the operation

Program Design Further expand each step if necessary Output: Tell user the result from operation Create a label to tell user the result Clean up: None Further expand each step if necessary Input: 2 numbers and 1 operation Create 2 textboxes. Create 4 buttons, one for each operation Processing: Take the two inputs and perform the operation Create a submit button and use button events to take the two inputs and perform the operation In each button event Create three variables of type Double Take the two inputs, change them into numeric values and store them into variables. Perform the operation and store them into the result variable. Change the result back into text and set it as the text of the label

Program Design Use pseudocode to convert the design into half programming code to ease the translation process. E.g. Processing: Take the two inputs and perform the operation Create a submit button and use button events to take the two inputs and perform the operation In each button event Create three variables of type Double Dim dblInput1, dblInput2, dblResult As Integer Take the two inputs, change them into numeric values and store them into variables. dblInput1 = Val(the text of textbox1) … Perform the operation and store them into the result variable. dblResult = dblInput1 + dblInput2 Design the interface layout

Program Implementation Finally the coding process Open Visual Studio 2008 Translate the design into actual code