subject
Computers and Technology, 12.08.2020 06:01 loloi83

1. Using pointers and dynamic memory; focusing on dynamic arrays. 2. Using memory leak detection tool
Problem You Need to Solve for This Project (Same as Project 2)
You are asked to write an app to keep track of a relatively small music library. The app should load song information from a data file once the app is started. It should allow user to view, add, remove, and search for songs. The app should save the data back to the same data file when the program exits.
What Your Program Should Do (Same as Project 2)
Write an interactive text based menu interface (using a loop) that will allow the user to
1. Enter information for a new song
2. Display information for all the songs in the database with index for each song
3. Remove a song by index
4. Search for songs by a certain artist
5. Search for songs by a certain album
6. 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. When the program starts, it should load the tasks from external file ("songs. txt") into memory. This can be done by a constructor in a SongList class if you'd like. When user enters information about the new song, the program needs to read them in, save them in memory and 1 eventually write them to the external data file ("songs. txt"). The file format could look like:
Stereo Hearts; Gym Class Heroes;3;34; The Papercut Chronicles II Counting Stars;OneRepulic; 4;17;Native
Some Implementation Requirements: (Different from Project 3!!!)
1. Use structs or class named Song to model song. You really should think about changing the struct to class if you have not done so in Project 3.
2. Use class named SongListto model the collection of songs.
3. Use dynamic array of Songto implement SongList.
4. Use dynamic character array to model the strings in Song, such as title and artist. The character array should be the exact size as needed, e. g "CS162" should use a character array of size 6 including "O'. You can set a maximum string size, but be sure your arrays are created dynamically.
5. Use destructor to deallocate the dynamic memory for the Song List object.
6. Make sure your program is "memory-leak-free" by using valgrind valgrind --tool=mencheck --leak-check=full a. out
7. When using class, please make sure you encapsulate the data which means make all the instance data member private and provide accessor methods and mutator methods (getters/setters) to access and manipulate the data.
8. For submission, your data file (songs. txt) should contain a sufficient set of test data. It should have test cases for same artist with multiple songs and same album with multiple songs in it.
9. You are required to have a makefile inside the project directory. The tar file should have the makefile in it. When I grade your project, after extracting from the tar file, all I will do is to type "make" to build your app and "make clean" to remove the executable and object code.
10. Be sure to submit all your .cpp and .h files, songs. txt and your makefile to D2L and thru mailx

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 09:00
Which best compares appointments and events in outlook 2010appointments have a subject man, and events do notappointments have a specific date or range of dates, and events do notappointments have a start and end time of day, and events do notappointments have a location option, and events do not
Answers: 2
question
Computers and Technology, 23.06.2019 15:20
An ou structure in your domain has one ou per department, and all the computer and user accounts are in their respective ous. you have configured several gpos defining computer and user policies and linked the gpos to the domain. a group of managers in the marketing department need different policies that differ from those of the rest of the marketing department users and computers, but you don't want to change the top-level ou structure. which of the following gpo processing features are you most likely to use? a, block inheritance b, gpo enforcement c, wmi filtering d, loopback processing
Answers: 3
question
Computers and Technology, 23.06.2019 17:30
What are the most commonly found items in the trash according to the municipal solid waste report?
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
2. fluorine and chlorine molecules are blamed fora trapping the sun's energyob forming acid rainoc producing smogod destroying ozone molecules
Answers: 2
You know the right answer?
1. Using pointers and dynamic memory; focusing on dynamic arrays. 2. Using memory leak detection to...
Questions
question
Mathematics, 01.12.2020 04:30
question
Mathematics, 01.12.2020 04:30
Questions on the website: 13722360