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 18:00
Budgets you to do all of the following expect a) send frivolously b) avoid over spending c) gain financial independence d) examine your priorities and goals
Answers: 2
question
Computers and Technology, 22.06.2019 18:30
Kto rozmawia z clamentain przez krótkofalówke w the walking dead która śledzi lee w 4 epizodzie
Answers: 1
question
Computers and Technology, 23.06.2019 01:50
Write a program that uses a random number generator to generate a two digit positive integer and allows the user to perform one or more of the following operations: a. double the number. b. reverse the digits of the number. c. raise the number to the power of 2, 3, or 4. d. sum the digits of the number. e. if the number is a two-digit number, then raise the first digit to the power of the second digit. f. if the number is a three-digit number and the last digit is less than or equal to 4, then raise the first two digits to the power of the last digit. after performing an operation if the number is less than 10, add 10 to the number. also, after each operation determine if the number is prime. each successive operation should be performed on the number generated by the last operation. your program should not contain any global variables and each of these operations must be implemented by a separate function. also, your program should be menu driven. 7. (fraction calculator) write a program that
Answers: 1
question
Computers and Technology, 23.06.2019 17:30
Per the municipal solid waste report, what are the most common sources of waste (trash
Answers: 3
You know the right answer?
1. Using pointers and dynamic memory; focusing on dynamic arrays. 2. Using memory leak detection to...
Questions
question
Mathematics, 18.10.2021 04:00
Questions on the website: 13722361