-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathReturn.h
39 lines (34 loc) · 1.08 KB
/
Return.h
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
33
34
35
36
37
38
39
#pragma once
#include "Customer.h"
#include "Transaction.h"
#include "HashTable.h"
#include "Movie.h"
#include "MovieFactory.h"
#include "Transaction.h"
#include <fstream>
#include <vector>
//----------------------------------------------------------------------------
// Class: Return
// child of transaction. Used when customer returns a movie to the store.
// setData assumes line from transaction file is formatted as:
// R CustomerID D Genre (Movie's sorting attributes)
// setData should start reading after R
//----------------------------------------------------------------------------
class Return :
public Transaction
{
public:
Return();
~Return();
// sets data from file
bool setData(ifstream&);
// processes Return
void doTransaction(const vector<Movie*>&, const HashTable&);
void display() const; // displays members of this
char getCommand() const; //getter
const char COMMAND = 'R';
Movie* getTMovie() const; //getter
private:
Movie* TMovie; // movie to be returned
int CustomerID; // Customer that's doing the return
};