THE DEADLINE OF DECEMBER 2 IS FIRM! NO CREDIT WILL BE AWARDED FOR ANY WORK HANDED IN AFTER 2:40 P.M., DECEMBER 2.
Perform a complete top-down design for the following problem. Code the final
algorithm in C++. Compile, debug (if necessary!) and execute your program.
See below for what to hand in.
TITLE: Top of the Pop Charts.
Your program would maintain a top-10 list of songs or records. It should
use an input file that lists the previous week's top 10 songs and their
artists. After the file has been read, the user is presented with each title
and is requested to enter a number between 0 and 10 to indicate the song's
current position (a 0 indicates that it is no longer on the charts). After
that, the user is asked for the remaining slots (songs that have appeared
since). The updated top 10 list is then displayed and stored in a new file.
The display of the list would also show the title's position in the previous
week's list.
INPUT
Each line of the input file contains one song, as below:
1 4 I'm Diggin' you (Me Shell)
where the first number is the title's position
in the current week. The second number is its position it the previous week.
The name of the artist is enclosed in parenthesis.
Your program should ask the user for the name of the input file.
OUTPUT
The output of the program will be as described above. The program should
prompt
the user for the name of the output file.
ERRORS
Any input which does not meet the specifications above is detected
and the user is reprompted for input after appropriate messages (shown above)
are displayed.
WHAT TO HAND IN
Hand in the following in the order given:
NOTES