Reference no: EM13942803
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
Influencing health policy
: Nurses can play a pivotal role in spearheading and influencing health care policy. Karen Daley's personal story, presented in this week's media program, is a poignant example of this.
|
Understand how the asx operates
: The aim of this assignment is to allow you to understand how the ASX operates and why it is important. Please read through the ASX information links on Moodle.
|
Oxygen in the presence of a catalyst and solvent
: Terephthalic Acid. (TPA) is produced by the reaction of p-Xylene. ,(PX) and Oxygen in the presence of a catalyst and solvent (S): Process conditions are provided for the Air entering the reactor and the reactor off gas.
|
Find the effective molecular mass of the mixture
: A mixture of perfect gases consist of 3kg of carbon monoxide and 1.5kg of nitrogen at a pressure of 0.1 MPa and a temperature of 298.15 K. Using table 5-1, find the effective molecular mass of the mixture.
|
Implement the storage portion of the tsupod
: Create file test_tsuPod.cpp where you are going to test the functionality of the tsuPod program
|
The nurse as advocate
: Advocacy is a professional responsibility for nurses. The third provision in the Code of Ethics for Nurses states that "The nurse promotes, advocates for and strives to protect the health, safety and rights of the patient." In addition, profession..
|
Determine specific gravity of a soil sample
: In an experiment to determine specific gravity of a soil sample, the following data is obtained:Mass of empty pycnometer 20.4 g Mass of pycnometer with soil sample 51.6 g Mass of pycnometer with soil sample filled with water 88.6 g Mass of pycnome..
|
Five ring theory be relevant here in analysis
: Could Warden's Five Ring Theory be relevant here in analysis? In War? Business? What would be your business rings?
|
Product design decisions and associated tradeoffs
: Using segment/customer needs analysis to make product design decisions and associated tradeoffs. The case brief should only include:
|