Name: ____________________________________________________ Alpha:
_____________ Section: ________
Describe help received: _________________________________________________________________
See the bottom for how to submit your work.
Due: Before 0800 on next class day
V assigned and initialized as shown in the picture.
|
|
V[1].peeps = V[2].peeps;
10 Betty Smith 900 Betty Johnson 1600 Betty Johnson 2400 Andy Smith 800 Betty Smith 1200 Betty Smith 2200 Betty Johnson 1600 Andy Smith 200 Betty Smith 2300 Betty Johnson 1900 |
The data file contains player names and game-scores for players playing an
online game.
Note: The score data shows that a single person played the game multiple times. For example, Betty Smith played the game 4 times. |
Your program should print out the names, followed by the highest score acheived by that person. A run of on the small file would look like this:
~/$ ./hw Filename: smallscoredata.txt Betty Johnson 2400 Andy Smith 800 Betty Smith 2300As you see, the names have to be sorted by the last name (in alphabetical order) breaking the tie by the first name (in alphabetical order).
Tips:
Another example run with scoredata.txt:
~/$ ./hw Filename: scoredata.txt Andy Brown 2200 Betty Brown 1900 Casey Brown 1500 Devon Brown 2400 Andy Johnson 700 Betty Johnson 2200 Casey Johnson 800 Devon Johnson 1600 Andy Smith 1800 Betty Smith 2100 Casey Smith 900 Devon Smith 2300 Andy Williams 1800 Betty Williams 1600 Casey Williams 800 Devon Williams 2200
Submit to the submission server (due: 0800 on the next class day)
~/bin/submit -c=IC210 -p=hw29 hw.cpp
Bring to class