Part I.
On the Z:\ drive is a file named examscores.txt It is in the folder Z:\jlwolfe\cosc110\ For each student who took the exam, the file contains a score and the student's name.. The score should be in the range 1 to 100 and the name is a single word. A sample entry in the file looks like this:
78 Charro
Make a folder for this project and name it after you and your partner. Copy the examscores.txt file into the folder where you will have the .cpp file for the program. Be sure to name the .cpp file after you and your partner.
You are to write a program to read the
first student's score and name. If the score is 60 or larger,
the program should display a message, such as "<Name>
passed" where <Name> is the actual person's name, as read
from the file. If the score is less than 60, the program should
display a message such as "<Name> failed"
again with <Name> replaced with the person's name. And if
the score is not valid (negative or greater than 100), the program should
display a message such as "File corrupted for <Name>"
with <Name> replaced by the person's name.
Part II.
Once you have part I working, modify the
program so that it can read in each student's score and name and
display a message about each of them. The last entry in the file
is a sentinel; it contains the value 0 Nobody
When your program reads this line, it should stop and not display anything.
For all other entries in the file, display the messages in a readable form
on the screen. Do not start part II until you have part I working
and demonstrated it to me.
Don't forget to put the usual comments
in your program and to choose reasonable variable names. When you
are finished (or when the class is over), copy your .cpp file to
Z:\jlwolfe\cosc110\secX\ex4\
where X is 1 or 2