Write a C++ class called Song to represent a song in a music collection. The data members of the Song...
inf1Write a C++ class called Song to represent a song in a music collection.
The data members of the Song class are strings representing the song title, artist's name, and the album where the song can be found. These instance variables for the class are to have private access modifiers so you will need to write the appropriate functions to allow a client to access and modify the data values.
Include a function that returns a string that identifies the Song object for display purposes. The general format of this string should be:
Title: [removed]
Artist: [removed]
Album: [removed]
As a specific example,
Title: Sleepyhead
Artist: Passion Pit
Album: Manners
A second file is to be written called SongList that contains a main function and separate function to display a menu of options for the user. The menu will contain options that allow the user to:
Add a song.
Remove a song.
Display all the songs in the list.
Quit.
The menu must list these options in the exact same order, using these numbers (1 - 4). Failure to follow this specification will reduce your project grade by 10%.
The SongList program is to read in a list of songs from a file; when option #4 (Quit) is selected; the program is to save the revised song list in a file with the name, songs.out.
You may use songs.in as a sample input file. However, your program is required to prompt the user to enter the name of the input file.
Recall from the previous project that the file is composed of the three data components (strings) that are separated by varying amount of white-space and a colon. Such as,
SongTitle : Artist : Album
- 11 years ago
- 10
Answer(1)
Purchase the answer to view it
NOT RATED
- c.zip
Bids(1)
other Questions(10)
- what is -2(8)
- How does a doctor use the field of science in their job?
- operation management
- A stock loses half it's value every week. If the stock was worth $125 starting out what is it worth...
- Discuss the differences and similarities between the FES and HAY. Explain their strengths and weaknesses.
- How do I make an identification key for these candies: hershey bar, sucker, smartie, cry baby, jolly rancher, and a...
- HCA250 W2 Participation Due today
- There were 11 bananas on the counter two-eleventh of the bananas were eaten today.What fraction of the bananas have been...
- We have two companies, Charm Communications Inc and Publicis Groupe SA. Which company is more liquid? Which company is more...
- Put the following steps in the order of a routine patient care flow, from the beginning through to the end of the patient encounter flow.