CPP VS 2010 Music Library Management - 42337

Solution Posted by


Rating : (19)A+
Solution Detail
Price: $20.00
Request Description


This program will provide an opportunity to practice C++ list processing using record structures (or classes) to store information.


Write an interactive program that will allow you to manage a music library.

First, design a record structure (or class) to store one song. The attributes will be:

    • song name
    • artist name
    • genre (category) of song
    • length of song (minutes:seconds)

The initial song "database" can be found in the file songlist.txt (in the folder). Design your program to read the songs from this file into your array of records. You will need to write the song data back to the file in a format that allows it to be re-read again later. For easier input and output, feel free to retain the underscore characters used to connect words.

Add the following capabilities to your application:

    • read the song list from a file (starting with provided data file)
    • add a song
    • delete a song
    • write song list to a file (in the same input format as provided)
    • display song list sorted by title
    • display song list sorted by genre and artist within genre
    • display song list randomly (simulating a "random play" feature)

Your program will essentially manage one array of song records (or objects). It will also allow additions and deletions for new songs. For additions, be sure to prompt the user for all components related to a song. For the listing requirements, consider one generic format for displaying the song list and then generate the sequence of songs by the variety of ordering requirements defined above. To make deletions of songs easier, feel free to use an index or number for the user to choose instead of requiring them to match a song title.

For the random song list, include a scheme that will create a random sequence of all songs in the library without repeating any. Of course, utilize the C++ random number generator features for this, but also create a strategy to list the songs "without replacement" of any back into the list.

Design your application using guidelines to maximize modularity, reusability, and maintainability.


Please use comments throughout the program explaining what you are doing and a comment at the top explaining what the program is used for.

Solution Description