Lesson Plan

ITCSS Home Student Center TallTech Home
 

October 5, 1999

Details

Title

Program Development and Programming Languages

Time Allotment

5 hrs

Reading / References

Read chapter 12 from Discovering Computers 2000

Objectives

Morning Coursework

Afternoon Coursework

For Marks

Assignment #: DC04
Assignment: Recipe Pseudocode & Flowchart
Due: Start of class - Oct 6/99
Marks: 10 marks

PART A: Design a program in pseudocode that describes how to prepare your favorite recipe. After typing the
recipe, do the following:

PART B: Develop a flowchart to graphically represent the control structure of your program.

Assignment Background Info

Sequence: Instructions typically follow a particular sequence. Computer instructions must be explicit.

  1. Get cup

  2. Pour Tea

  3. Drink Tea

Repetitions: Sometimes steps are repeated. "Pour hot tea into each teacup"

REPEAT
    GET a NEW teacup
    pour the hot tea INTO that teacup
UNTIL the teapot is empty OR there are no more teacups available

Selection/Conditional: Computer can make choices

IF milk wanted, do this:
    add milk to tea
ELSE, do this:
    add nothing

Key words to capitalize

FOR EACH, REPEAT, UNTIL, WHILE, IF, THEN, ELSE, SELECT FROM, NEW
DELETE, PUT, GET, INTO

Example (to make tea):

SELECT earl grey FROM shelf
fill tea kettle with water
PUT tea kettle on stove
REPEAT
   apply heat to tea kettle
UNTIL tea kettle boils
GET tea kettle from stove
turn off stove
PUT earl grey tea INTO teapot
pour tea kettle INTO teapot
wait UNTIL tea is ready
REPEAT
   GET a NEW teacup
   pour teapot INTO teacup
   IF tea drinker like lemon THEN
      PUT lemon INTO teacup
   ENDIF
UNTIL teapot is empty OR there are no more teacups
PUT teapot back in kitchen

Lab Work