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 of Chapter 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 #: Movie rental functionality implemented
Task #: STL list methods used
Task #: Rent video methods implemented
custDat.txt
Donald Duck
Mickey Mouse
Minne Mouse
Goofy Dog
Doc Dwarf
Grumpy Old
customerh
#ifndef HcustomerType
#define HcustomerType
#include
#include
#include "personType.h
#include
using namespace std;
class customerType: public personType
friend ostream& operatorostream&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 setCustInfostring first, string last, int acctNo;
Set firstName, lastName, and account number according
to the parameters
firstName first; lastName last;
void rentVideostring;
This function rents a video to the customer
void returnVideostring;
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;
customerTypestring 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 ;
overload operators for comparisons
bool operatorcustomerType;
bool operator!customerType;
bool operatorint;
void insertconst string;
private:
int custAcctNo; store account number
list rentedVideoList;
;
#endif
customerListTypeh
#ifndef HcustomerListType
#define HcustomerListType
#include
#include
#include
#include "customer.h
using namespace std;
class customerListType
public:
bool custSearchIdint id;
void custReturnVideoint id string title;
void custRentVideoint id string title;
int custGetNoOfRentalsint id;
void rentedVideosInfo;
void insertconst customerType&;
void print;
private:
void searchCustint id bool& found,
list::iterator &location;
list custList;
;
#endif
personType.h
#ifndef HpersonType
#define HpersonType
#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 setNamestring 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
personTypestring 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 operatorconst personType& const;
bool operator!const personType& const;
bool operatorconst personType& const;
bool operatorconst personType& const;
bool operatorconst personType& const;
bool operatorconst personType& const;
private:
string firstName; store the first name
string lastName; store the last name
;
#endif
I need the maincpp customerListTypelmpcpp customerlmpcpp videoLinkedListType.cpp
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
