-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathborrow.h
47 lines (40 loc) · 1.34 KB
/
borrow.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
40
41
42
43
44
45
46
47
/* Aaron Parks
* Prof. Carol Zander
* CSS 343 : Winter 2010
* Lab 4v4 - MOVIE Store */
/*-- Borrow -----------------------------------------------------------
* Derived from 'Transaction'
* Contains specialized functionality for Borrow Transaction types.
*
*-- Assumptions ------------------------------------------------------
* - Default Constructor
* -> will only be invoked by TransFactory
* - createItem
* -> parameters were checked for validity before being passed to
* this function. Item is a valid Item object.
*-------------------------------------------------------------------*/
#ifndef BORROW_H
#define BORROW_H
#include "transaction.h"
#include <string>
using namespace std;
class Borrow : public Transaction
{
public:
//default constructor
Borrow();
//constructor
Borrow(int,char,Item*);
//creates new 'Borrow' by calling constructor
//returns pointer to new object
virtual Transaction* createTrans(int,char,Item*);
//displays formatted data for 'Borrow'
virtual void display() const;
//modifies the values of the Item action is being performed on
virtual bool perform();
protected:
int custID; //customer ID
char media; //media type transaction is acting upon
Item* rented; //Item being borrow //used for 'retrieve'
};
#endif