|
|
|
|
|
|
|
Figure 12-9
Data Structures for Exam Program |
|
|
|
|
|
|
|
|
Open roster file for input
IF file could not be opened
Terminate program
Get class roster
Check in students
Print lists |
|
|
|
|
|
|
|
|
|
To open the input file, we'll make our program more flexible by prompting the user for a file name and reading it in as a string. |
|
|
|
|
|
|
|
|
Open For Input (Inout: someFile) Level 1 |
|
|
|
|
|
|
|
|
Prompt user for name of disk file
Read fileName
Associate fileName with stream someFile,
and try to open it
IF file could not be opened
Print error message |
|
|
|
|
|
|