Objective

The purpose of this lab is to introduce advanced data structures (ADTs) in the Standard Template Library (STL).

Procedure

Step 1: Download the file lab-CustomerRecords-Demo.zip from CANVAS, and store on the local computer. The folder will contain several files. The major files:

  • Visual Studio 2010 Solution (VS2010) (CustomerRecords.sln)
  • Visual Studio 2010 Project (CustomerRecords.vcxproj)
  • main_demo.cpp (Application driver file)
  • Person.cpp
  • Person.h

Step 2: Compile and test your code.

Right click on the project "CustomerRecords" in VS2010 Solution Explorer, select "Build" to compile the code.
This will generate "CustomerRecords.exe".
Search in Windows to find and run the DOS command prompt.
From the command prompt

The Results will display:

the stack is empty
Press any key to continue . . .
customer in the stack is George Skurla

Press any key to continue . . .
The stack of customers contain : 1customers

Press any key to continue . . .
The stack of customers contain : 6 customers
Press any key to continue . .

My most recent customer is : Michael Scofield
Current Customer is : Raymond Reddington
Press any key to continue . . .
  • Modify this software to print the names of all the customer to standard I/O program to print the name of all the customers in the stack;
  • Write a C++ program to create a playlist of albums from different artist and different tracks. Demonstrate how you would keep track of the most recently played and the list recently played:
    • Album
    • Tracks

Create Album class

Attributes

  • std::string NameOfArtist
  • std::string TitleOfAlbum
  • std::string YearOfRelease
  • Track MostRecentlyPlayedTrackFromAlbum

Methods

  • std::string getNameOfArtist()
  • std::string getTitleOfAlbum()
  • std::string getOfRelease()
  • Track Album :: getMostRecentlyPlayedTrack
  • void setNameOfArtist (std::string)
  • void setTitleOfAlbum (std::string)
  • void YearOfRelease (std::string)
  • void setMostRecentlyPlayedTrack(Track MostRecent )
  • void printsAlbumInformation(): A function that prints all the attributes of the selected album.

Create Track class

Attributes

  • std::string NameOfTrack
  • std::string LengthOfTrack

Methods

  • std::string getNameOfTrack()
  • std::string LengthOfTrack()
  • void setNameOfTrack (std::string)
  • void setLengthOfTrack (std::string)
  • void printTrackInformation(); a function that prints the track information to standard I/O
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.