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 13:30
Write lines of verse that rhyme to remember the following information: acid rain is a type of air pollution caused by chemicals in the air.
Answers: 1
question
Computers and Technology, 23.06.2019 11:30
The most accurate readings that you can take on an analog vom are when the meter's pointer is at the a. center scale. b. extreme right. c. near right. d. extreme left.
Answers: 1
question
Computers and Technology, 23.06.2019 18:20
What is wi-fi infrastructure? a metropolitan area network that uses radio signals to transmit and receive data a communications technology aimed at providing high-speed wireless data over metropolitan area networks a means by which portable devices can connect wirelessly to a local area network, using access points that send and receive data via radio waves includes the inner workings of a wi-fi service or utility, including the signal transmitters, towers, or poles and additional equipment required to send out a wi-fi signal
Answers: 2
question
Computers and Technology, 23.06.2019 19:00
Now you’re on your own. include a short summary of this section with plots in your lab report. write a matlab script file to do steps (a) through (d) below. include a listing of the script file with your report. 1 the soundsc(xx,fs) function requires two arguments: the first one (xx) contains the vector of data to be played, the second argument (fs) is the sampling rate for playing the samples. in addition, soundsc(xx,fs) does automatic scaling and then calls sound(xx,fs) to actually play the signal. mcclellan, schafer, and yoder, dsp first, 2e, isbn 0-13-065562-7. prentice hall, upper saddle river, nj 07458. c 2015 pearson education, inc. 4 mcclellan, schafer and yoder, signal processing first. prentice hall, upper saddle river, new jersey, 2003. c 2003 prentice hall. (a) generate a time vector (tt) to cover a range of t that will exhibit approximately two cycles of the 4000 hz sinusoids defined in the next part, part (b). use a definition for tt similar to part 2.2(d). if we use t to denote the period of the sinusoids, define the starting time of the vector tt to be equal to t , and the ending time as ct . then the two cycles will include t d 0. finally, make sure that you have at least 25 samples per period of the sinusoidal wave. in other words, when you use the colon operator to define the time vector, make the increment small enough to generate 25 samples per period. (b) generate two 4000 hz sinusoids with arbitrary amplitude and time-shift. x1.t / d a1 cos.2
Answers: 1
You know the right answer?
1. Using pointers and dynamic memory; focusing on dynamic arrays. 2. Using memory leak detection to...
Questions
Questions on the website: 13722363