Question: Redo Programming Exercise 1 5 of Chapter 1 6 so that it uses the STL class list to process the list of DVDs owned by

Redo Programming Exercise 15 of Chapter 16 so that it uses the STL class list to process the list of DVDs owned by the store, the list of DVDs rented by each customer, and the list of store members.
Task #01: Movie rental functionality implemented
Task #02: STL list methods used
Task #03: Rent video methods implemented
/////////////////////////////////////////////////// custDat.txt
Donald Duck 1
Mickey Mouse 2
Minne Mouse 3
Goofy Dog 4
Doc Dwarf 5
Grumpy Old 6
////////////////////////////////////////////////////////customer.h
#ifndef H_customerType
#define H_customerType
#include
#include
#include "personType.h"
#include
using namespace std;
class customerType: public personType
{
friend ostream& operator<<(ostream&,customerType&);
// overload stream insertion operator
public:
void print();
//Output account number, first name, last name, and
//number of rentals, in the form:
//acctNo firstName lastName noOfRentals
void setCustInfo(string first, string last, int acctNo);
//Set firstName, lastName, and account number according
//to the parameters
//firstName = first; lastName = last;
void rentVideo(string);
//This function rents a video to the customer
void returnVideo(string);
//This function renturns a video to the customer
int getNoOfRentals();
//This function returns the number of
//videos rented by the customer.
int getAcctNo();
//This function returns the account number of
//the customer.
void printRentedVideo();
customerType(string first, string last, int acctNo);
//constructor with parameters
//set firstName and lastName according to the parameters
//firstName = first; lastName = last;
customerType();
//Default constructor;
//intialize firstName and lastName, and custAcctNo
//Postcondition: firstName =""; lastName ="";
// custAcctNo =0;
//overload operators for comparisons
bool operator==(customerType);
bool operator!=(customerType);
bool operator==(int);
void insert(const string);
private:
int custAcctNo; //store account number
list rentedVideoList;
};
#endif
/////////////////////////////////////////////////////customerListType.h
#ifndef H_customerListType
#define H_customerListType
#include
#include
#include
#include "customer.h"
using namespace std;
class customerListType
{
public:
bool custSearchId(int id);
void custReturnVideo(int id, string title);
void custRentVideo(int id, string title);
int custGetNoOfRentals(int id);
void rentedVideosInfo();
void insert(const customerType&);
void print();
private:
void searchCust(int id, bool& found,
list::iterator &location);
list custList;
};
#endif
///////////////////////////////////////////// personType.h
#ifndef H_personType
#define H_personType
#include
using namespace std;
class personType
{
public:
void print() const;
//Function to output the first name and last name
//in the form firstName lastName.
void setName(string first, string last);
//Function to set firstName and lastName according
//to the parameters.
//Postcondition: firstName = first; lastName = last
string getFirstName() const;
//Function to return firstName and lastName via the
//parameters.
//Postcondition: The value of firstName is returned
string getLastName() const;
//Function to return firstName and lastName via the
//parameters.
//Postcondition: The value of lastName is returned
personType(string first ="", string last ="");
//Constructor
//Sets firstName and lastName according to the parameters.
//The default values of the parameters are empty strings.
//Postcondition: firstName = first; lastName = last
bool operator==(const personType&) const;
bool operator!=(const personType&) const;
bool operator<=(const personType&) const;
bool operator<(const personType&) const;
bool operator>=(const personType&) const;
bool operator>(const personType&) const;
private:
string firstName; //store the first name
string lastName; //store the last name
};
#endif
I need the //main.cpp //customerListTypelmp.cpp //customerlmp.cpp// videoLinkedListType.cpp

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!