Implement the storage portion of the tsupod

Assignment Help Operating System
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

Reference no: EM13942803

Questions Cloud

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:

Reviews

Write a Review

Operating System Questions & Answers

  Multiple choice - system analysis and design

The primary benefits of the Waterfall Development methodology is needs are completely specified and held relatively constant prior to programming.

  Process customer order history from a file

Required help creating a document that Develop an application that will read and procedure customer history order information from a document.

  Propose the computing and data communications elements

Propose the computing and data communications elements needed to satisfy the system requirements defined in the given case. You must specify the criteria for evaluating the hardware, software and data communications requirements of your system.

  Access time for reading a word from a virtual address

Consider a computer system where the overhead required for reading a word from the page table is 1.25ms. A TLB lookup of a word requires 250 ns.

  Identify an operating system and application combination

Identify an operating system and application combination, and discuss at least 2 cluster implementation models supported. Identify and discuss the advantages and disadvantages of the implementation of the models you suggested

  Identify one reason indexes are useful

Describe what you would have to do if indexes weren't available in order to get the reason you initially stated and how the query optimizer generates and selects a query plan.

  Performing the maintenance

A hard drive must be managed to be used most efficiently. This maintenance with deleting old files, defragmenting a drive so that it does not waste space, as well as, from time to time, discovering and attempting to correct disk failures.

  What is the maximum consecutive period

What is the maximum consecutive period of time any process remains in the ready queue (the max waiting time) expressed in terms of N,S,Q?

  Implementing a data warehouse project

Assume you are implementing a data warehouse project for a consumer and require to evaluate the many tools available for extracting, transforming, and loading data into the data warehouse from several sources.

  Compare three mobile platforms

You have just been given an assignment to compare three mobile platforms for the following project. Orion is an online service company that enables member subscribers to conduct their own online surveys. Orion has decided to extend this service

  Find total memory bytes stored in the cache

Following, a byte addressable main memory of 2^16 bytes and block size of eight bytes, using direct mapped cache consisting of thirty-two lines.

  An alternative to traditional equity and debt financing is

complete an apa-formatted two-page paper not including the title and reference pages answering the following

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd