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, 22.06.2019 23:30
What does 21 pilots middle aged name as a band 15 years prior to them naming their band 21 pilots?
Answers: 1
question
Computers and Technology, 23.06.2019 12:30
How is the brightness of oled of the diaplay is controled
Answers: 1
question
Computers and Technology, 23.06.2019 16:00
Which analyst position analyzes information using mathematical models to business managers make decisions?
Answers: 1
question
Computers and Technology, 23.06.2019 18:00
While inserting images, the picture command is usually used to insert photos from a digital camera, and the clip art command is usually used to a.edit the sizes and other characteristics of photos that have been inserted. b.take a screenshot of an image and copy it to the clipboard for pasting. c.search for drawings or other images from a library of prepared pictures. d.make illustrations using lines and shapes that are easy to manipulate.
Answers: 1
You know the right answer?
1. Using pointers and dynamic memory; focusing on dynamic arrays. 2. Using memory leak detection to...
Questions
question
English, 18.11.2020 20:50
question
Social Studies, 18.11.2020 20:50
question
English, 18.11.2020 20:50
question
Advanced Placement (AP), 18.11.2020 20:50
Questions on the website: 13722361