-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathhistory.cpp
32 lines (28 loc) · 1.31 KB
/
history.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//----------------------------------------------------------------------------
// History.cpp
// Implementation:
// -- This class is responsible for storing the history of customers
// transactions with movie type
// Assumptions:
// -- Inherits all behavior from Transaction parent class, although it has
// a unique constructor and destructor
// -- display() makes a call to Customer displayHistor() method
//----------------------------------------------------------------------------
#include "history.hpp"
//------------------------------constructor-----------------------------------
History::History() : Transaction() { }
//------------------------------destructor------------------------------------
History::~History() { }
//--------------------------------process-------------------------------------
// will process the history transaction. Calls the customer's displayHistory
// method which will print the history if it exists, or print a message to
// let us know there is no history for this customer
bool History::process(string mediaType, Movie* movie, Customer* customer) {
customer->displayHistory();
return true;
}
//---------------------------------create-------------------------------------
// returns a pointer to a History object for factory
Transaction* History::create() {
return new History();
}