PROGRAMMING Program Development Learning Outcomes Apply program development

  • Slides: 14
Download presentation
PROGRAMMING Program Development

PROGRAMMING Program Development

Learning Outcomes • Apply program development phases to solve problems • Develop a program

Learning Outcomes • Apply program development phases to solve problems • Develop a program

Situation • Your younger brother has a problem with a basic mathematic operations like

Situation • Your younger brother has a problem with a basic mathematic operations like addition, subtraction, multiplication, and division. Your parents ask you to develop one simple system using Visual Basic to help your brother. • Your system should have function button to calculate the additional, subtraction, multiplication, and division for at least two integer numbers

Programming Development Phase 1. 2. 3. 4. 5. Problem Analysis Program Design Coding Testing

Programming Development Phase 1. 2. 3. 4. 5. Problem Analysis Program Design Coding Testing and Debugging Documentation

1. Problem Analysis • What the problem? • What the input, process, and output?

1. Problem Analysis • What the problem? • What the input, process, and output? • What the formula on how to calculate the mathematic operations?

2. Program Design • Write the pseudo code • Write flow chart • Design

2. Program Design • Write the pseudo code • Write flow chart • Design user interface

Pseudo code PROGRAM Mathematic_Operations READ the first number READ the second number READ commandbutton

Pseudo code PROGRAM Mathematic_Operations READ the first number READ the second number READ commandbutton Add CALCULATE the sum of number 1 and number 2 PRINT the answer for Addition END PROGRAM

Flow Chart START READ number 1 & 2 CALCULATE PRINT the answer STOP/END

Flow Chart START READ number 1 & 2 CALCULATE PRINT the answer STOP/END

User Interface

User Interface

3. Coding • SCRIPTING

3. Coding • SCRIPTING

Coding ‘formula for additional (internal documentation) Private Sub cmd. Add_Click() Dim Number 1, Number

Coding ‘formula for additional (internal documentation) Private Sub cmd. Add_Click() Dim Number 1, Number 2 As Integer Number 1 = txt. Number 1. Text Number 2 = txt. Number 2. Text txt. Sum = Number 1 + Number 2 End Sub

4. Testing and Debugging • RUN & COMPILING

4. Testing and Debugging • RUN & COMPILING

5. Documentation • Internal Documentation • External Documentation

5. Documentation • Internal Documentation • External Documentation

Exercises • Modify the additional formula to use for subtractions, multiplication and division.

Exercises • Modify the additional formula to use for subtractions, multiplication and division.