CSCI 1010 – Programming Assignment 7
FilesRequired Reading
Gaddis - Chapter 5 - Section 11
Instructions
For this assignment you will be writing a program that reads information about a sequence of tracks on an album from a file, and generates a formatted track listing with additional summary information. The input file should be namedalbuminfo.txtand have the following format:
...
The lines contain the lengths of each track in minutes and seconds (without leading zeros.)
The output file should be namedtracklist.txtand have the following format:
Album title:
Artist:
Tracks:
--------------------------------------------------
01 - MM:SS
...
XX - MM:SS
--------------------------------------------------
In addition, you must display the following to the console:
Welcome to 's tracklist generator!
Processed XX tracks.
Total album length: MM:SS
Note: when displaying time information, the seconds should have leading zeros but the minutes should not.
Example Input and Output
Given the following input file:
Bows + Arrows
The Walkmen
What's in It for Me
2 53
The Rat
4 27
No Christmas While I'm Talking
4 30
Little House of Savages
3 15
My Old Man
4 46
138th Street
3 2
The North Pole
3 48
Hang On, Siobhan
3 45
New Year's Eve
2 20
Thinking of a Dream I Had
4 33
Bows + Arrows
5 16
Your program should generate the following output file:
Album title: Bows + Arrows
Artist: The Walkmen
Tracks:
--------------------------------------------------
01 - What's in It for Me 2:53
02 - The Rat 4:27
03 - No Christmas While I'm Talking 4:30
04 - Little House of Savages 3:15
05 - My Old Man 4:46
06 - 138th Street 3:02
07 - The North Pole 3:48
08 - Hang On, Siobhan 3:45
09 - New Year's Eve 2:20
10 - Thinking of a Dream I Had 4:33
11 - Bows + Arrows 5:16
--------------------------------------------------
It should also display the following to the console (with your actual name in place of):
Welcome to 's tracklist generator!
Processed 11 tracks.
Total album length: 42:35
Notes and Comments
The name of the file you hand in must be your last name followed byProgram7with the extension.cpp. For example, mine would becolemanProgram7.cpp.
Make sure to include comments with your name, a description of what the program does, the course (CSCI 1010), and the assignment name (Programming Assignment 7) at the beginning of your source file.
Make sure you only hand in the source file for your assignment, not the executable file, or any other files that Visual Studio creates.
Your programs must compile without errors in order to be graded. Once your program compiles make sure to test it usingmultiple test casesto see if it meets the requirements of the assignment.