(Solved) : Using Linux Unix Code 3 Folders Maincpp Songh Songcpp Please Correct Answer Third Time Pos Q42781097 . . .

Using Linux/Unix ; the code should be in 3 folders main.cpp /song.h/ song.cpp

please correct answer only this third time I post the question:(

You are asked to write an app to keep track of a relativelysmall music library. The app should
load song information from a data file once the app is started. Itshould allow user to view, add,
remove, and search for songs. The app should save the data back tothe same data file when the
program exits.
What Your Program Should Do:
Write an interactive text based menu interface (using a loop) thatwill allow the user to
 Enter information for a new song
 Display information for all the songs in the database with indexfor each song
 Remove a song by index
 Search for songs by a certain artist
 Search for songs by a certain album
 Quit
For each song, you need to keep track of:
 title
 artist
 duration
 album
Allow the program to keep looping until user wants to quit. Whenthe program starts, it should
load the tasks from external file (“songs.txt”) into memory. Whenuser enters information
about the new song, the program needs to read them in, save them inmemory and eventually
write them to the external data file (“songs.txt”). The file formatcould look like:
Stereo Hearts;Gym Class Heroes;3;34;The Papercut ChroniclesII
Counting Stars;OneRepulic;4;17;Native
The ‘;’ is used as a delimiter or field separator. Each record endswith a new line character. Also the above sample data came from myteen son, not a reflection of your instructor’s music taste 
Some Implementation Requirements: (the code must include all therequirements )
1. Use class named Song to model task.

2. Use class named SongList to model the collection oftasks.

3. Use linear linked list to model SongList. Keep track of bothhead and tail of the linear linked list.

4. The linear linked list should be sorted by song title. Pleasedon’t use sorting algorithms for this. To make the list sorted, yousimply insert the song at the correct position when you add it.

5. Use dynamic character array to model the strings in Song,such as artist and title. The character array should be the exactsize as needed, e.g “CS160” should use an charcter array of size 6including ‘ ‘.

6. Use destructor to deallocate the dynamic memory for theobject.

7. Make sure your program is “memory-leak-free” by usingvalgrind valgrind –tool=memcheck –leak-check=fullexecutablefile

8. When using class, please make sure you encapsulate the datawhich means make all the instance data member private and provideaccessor methods and mutator methods to access and manipulate thedata.

9. For submission, your data file should contain a sufficientset of test data. It should have test cases for same artist withmultiple songs and same album with multiple songs in it.

Expert Answer


Answer to Using Linux/Unix ; the code should be in 3 folders main.cpp / song.h/ song.cpp please correct answer only this third tim…

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us

× How can I help you?