Create file testtsupodcpp where you are going to test the


I have sarted this and will send you what I have along with the files given to us.

Implement the storage portion of the tsuPod (pronounced "su Pod" - the much smaller version of the iPod).

Specifications:

General design:

The code must be designed to allow the storage of the following data:

-up to 8 songs not to exceed 25MB

-for each song we will store the title (string), artist (string), and size (int) in MB-

-the title and artist cannot be blank

-the size of each song must be greater than zero

Code design:

-you are provided with the tsuPod.h file with prototypes of the functions that you need to define. (Note: some of the prototypes have to be modified for the test code to work correctly)

-you have to create file tsuPod.cpp where you define functions specified in tsuPod.h file

-you have to create file test_tsuPod.cpp that tests the functionality of tsuPo

- following variables and structures must be defined in your tsuPod.h code (Note: in your code 8 songs should be presented with array of structures)

const int NUM_SONGS = 8; //we will have the maximum 8 slots with some slots being empty
const int MEMORY_SIZE = 25; //total memory size of tsuPod in MB

struct TsuPod
{
string title;
string artist;
int size;
};

- tsuPod.h should be included in both tsuPod.cpp and test_tsuPod.cpp
- If you are using the command line for compilation you need to type
g++ -c tsuPod.cpp //produce tsuPod.o object file
g++ -c test_tsuPod.cpp //produce test_tsuPod.o object file
g++ -o test tsuPod.o test_tsuPod.o //to get the executable file test.
Note: it is a very good idea to test your code for command line compilation, because if you code does not compile through command line some points can be deducted.
? If you want to use DevC++ environment for simple testing, for the linker to work correctly you have to create a new project and add tsuPod.cpp, tsuPod.h, test_tsuPod.cpp files to this project.
Testing:

- Create file test_tsuPod.cpp where you are going to test the functionality of the tsuPod program
- Following storage functionalities have to be tested to receive full grade:
o Initialization
o Successful song addition
o Unsuccessful song addition - failure due to the lack of memory
o Unsuccessful song addition - failure due to other reason (ex: no empty slots)
o Successful song removal
o Unsuccessful song removal - failure because a song with such name was not found
o Clearing of the song list
o Shuffle functionality - implementation and testing of this function will result in an
extra grade.
? In your test_tsuPod.cpp, explain what exactly you are testing with each block of code. Examples: test addition of a song to a play list, test shuffling capabilities, etc.

tsuPod.h file and the example of the test_tsuPod.cpp are located in the archive of the assignment

IMPORTANT!
You must submit all three files tsuPod.h, tsuPod.cpp, test_tsuPod.cpp in one archive Assignment4_ xxx1_ xxx2.zip, where xxx1 is your first name and xxx2 is your last name.
Turn in: Hard copy of the source file (beginning of class on 10/22)
.
Note: This program has to be done using a Linux environment.
You may do this program as an individual or with one partner. If you choose to use a partner, you will submit one code, but each file name has to have names of BOTH students who worked on the project.

Attachment:- program4.zip

Solution Preview :

Prepared by a verified Expert
Operating System: Create file testtsupodcpp where you are going to test the
Reference No:- TGS01252109

Now Priced at $20 (50% Discount)

Recommended (97%)

Rated (4.9/5)