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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 11:00, bombbomb2157
Eva has many contacts on the professional networking site she uses which contacts are considered second degree
Answers: 3
image
Computers and Technology, 23.06.2019 01:30, bri2728
Jason works as an accountant in a department store. he needs to keep a daily record of all the invoices issued by the store. which file naming convention would him the most? a)give the file a unique name b)name the file in yymmdd format c)use descriptive name while naming the files d)use capital letters while naming the file
Answers: 3
image
Computers and Technology, 23.06.2019 07:30, Morganwing1019
To check spelling errors in a document, the word application uses the to determine appropriate spelling. internet built-in dictionary user-defined words other text in the document
Answers: 2
image
Computers and Technology, 23.06.2019 13:30, alannaamarriee
Jace needs to answer a question on square roots to win a quiz. how can he use a spreadsheet to find the square root of 786? a. use the functions round and count b. create a table and chart c. use the function sqrt d. use the function now
Answers: 3
You know the right answer?
1. Using pointers and dynamic memory; focusing on dynamic arrays. 2. Using memory leak detection to...

Questions in other subjects:

Konu
Mathematics, 18.11.2020 08:30