5.1  Programming Development

Index Code Tester

OBJECTIVE

DISCUSSION

Program Development Steps 

Flowcharting 

 Flowchart for lottery Flowchart for lottery

Pseudocode 

Play Once Play Until You Win

Pick Numbers

Buy Ticket

Check Numbers

if (win) celebrate

else cry

While (not win)

      Pick Numbers

      Buy Ticket

      Check Numbers

EXERCISES

1.  Assume that you go to the video store with family and/or friends. Create a flowchart and write pseudo-code for picking a movie and checking out.  Be prepared to share your chart and /or pseudo-code with the class.

2.  Using the provided pseudo-code for picking a movie with 2 or more people, create a flowchart.

3.  Convert to pseudo-code, the provided flowchart for checking out.

4.  Complete the provided flow chart for the Smart Train.

5.  Create a flowchart and pseudo-code for determining your grade.  Assume that your grade is based on dividing your total earned points by your total possible points.  If this number is greater then or equal to 0.9 then your grade is an "A".  If the number is between 0.8 and 0.9 then your grade is a "B" and so on.  Also assume that you have a list of grades such as 9/10, 50/50, and so on. You will read one grade at a time, add your earned points to the total earned points and add the possible points to the total possible points. You must assume that you do not know how many grades you have and that you keep adding to your totals while there are more grades to add.  After you get your totals, you determine your letter grade.

6. Create a flowchart and pseudo-code for adding change (coins). Assume that you have a piggy bank filled with change.  You will pull out one coin at a time, check what it is, and add the appropriate value to the total.

LINKS AND HELP

http://www.techtutorials.com/tutorials/programming/introduction/3gl_flow.shtml
http://deming.eng.clemson.edu/pub/tutorials/qctools/flowm.htm