-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTransaction.h
More file actions
38 lines (30 loc) · 1002 Bytes
/
Copy pathTransaction.h
File metadata and controls
38 lines (30 loc) · 1002 Bytes
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
#pragma once
#include "Movie.h"
#include <fstream>
#include <string>
#include <vector>
//----------------------------------------------------------------------------
// Class: Transaction
// parent class of Borrow, Return, History, and Inventory.
// most functions are implemented in children
//----------------------------------------------------------------------------
// forward declaration
class HashTable;
using namespace std;
class Transaction
{
public:
// constructors and destructor
Transaction();
virtual ~Transaction();
virtual bool setData(ifstream&); // sets data from file
// processes transaction
virtual void doTransaction(const vector<Movie*>&, const HashTable&);
virtual void display() const;
virtual char getCommand() const;
virtual Movie* getTMovie() const;
// finds and retrieves a Movie from the first paramter
Movie* retrieveMovie(const vector<Movie*>&, Movie*) const;
protected:
string MediaType = "D";
};