< previous page page_687 next page >

Page 687
Print (In: student, isPresent, length) Level 1
Print "The following students are taking the exam."
FOR count going from 0 through length-1
  IF isPresent[count]
      Print student[count]
Print "The following students have missed the exam."
FOR count going from 0 through length-1
  IF NOT isPresent[count]
     Print student[count]

At this point, you need to go back over the top-down design and test it. Have you forgotten anything? Yes, you need to initialize the array isPresent to all FALSE.
Initialize Attendence (Out: isPresent) Level 1
FOR count going from 0 through max. number of students minus 1
  Set isPresent[count] = FALSE

The design is now ready to be coded.

 
< previous page page_687 next page >