Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Upcoming SlideShare
×

# La5 Programming

1,111 views

Published on

Published in: Business, Technology
• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here
• Be the first to comment

### La5 Programming

1. 1. PROGRAMMING Program Development 040407 Prepared by: Norhasimah Mohamed, Head Of ICT Panel, SMK Sungai Pusu, Gombak Selangor.
2. 2. Learning Outcomes <ul><li>Apply program development phases to solve problems </li></ul><ul><li>Develop a program </li></ul>
3. 3. Situation <ul><li>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. </li></ul><ul><li>Your system should have function button to calculate the additional, subtraction, multiplication, and division for at least two integer numbers </li></ul>
4. 4. Programming Development Phase <ul><li>Problem Analysis </li></ul><ul><li>Program Design </li></ul><ul><li>Coding </li></ul><ul><li>Testing and Debugging </li></ul><ul><li>Documentation </li></ul>
5. 5. 1. Problem Analysis <ul><li>What the problem? </li></ul><ul><li>What the input, process, and output? </li></ul><ul><li>What the formula on how to calculate the mathematic operations? </li></ul>1
6. 6. 2. Program Design <ul><li>Write the pseudo code </li></ul><ul><li>Write flow chart </li></ul><ul><li>Design user interface </li></ul>2
7. 7. Pseudo code <ul><li>PROGRAM Mathematic_Operations </li></ul><ul><li>READ the first number </li></ul><ul><li>READ the second number </li></ul><ul><li>READ commandbutton Add </li></ul><ul><li>CALCULATE the sum of number 1 and number 2 </li></ul><ul><li>PRINT the answer for Addition </li></ul><ul><li>END PROGRAM </li></ul>
8. 8. Flow Chart START READ number 1 & 2 CALCULATE STOP/END PRINT the answer
9. 9. User Interface
10. 10. 3. Coding <ul><li>SCRIPTING </li></ul>3
11. 11. Coding <ul><li>‘ formula for additional (internal documentation) </li></ul><ul><li>Private Sub cmdAdd_Click() </li></ul><ul><li>Dim Number1, Number2 As Integer </li></ul><ul><li>Number1 = txtNumber1.Text </li></ul><ul><li>Number2 = txtNumber2.Text </li></ul><ul><li>txtSum = Number1 + Number2 </li></ul><ul><li>End Sub </li></ul>
12. 12. 4. Testing and Debugging <ul><li>RUN & COMPILING </li></ul>4
13. 13. 5. Documentation <ul><li>Internal Documentation </li></ul><ul><li>External Documentation </li></ul>5
14. 14. Exercises <ul><li>Modify the additional formula to use for subtractions, multiplication and division. </li></ul>