-
Notifications
You must be signed in to change notification settings - Fork 0
/
GBookStore.h
executable file
·54 lines (51 loc) · 1.55 KB
/
GBookStore.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
48
49
50
51
52
53
54
//
// GBookStore.h
// GBookStore
// Description Header File of GBookStore
// Created by Swasti Gupta on 5/31/15.
//
//
#include "Book.h"
#include "Transaction.h"
#include "Customer.h"
#include <vector>
#include <algorithm>
#include <fstream>
#include <map>
#include "Base.h"
#ifndef __ABookStore__ABookStore__
#define __ABookStore__ABookStore__
/*
Declaring an Interface class for BookStore so that any library
can be used for the implementation of functions of Book Store
(Here using STL)
*/
class ABookStore
{
public:
virtual GStatus readPriceList(char* filename) = 0;
virtual GStatus readTransactionList (char* filename) = 0;
virtual GStatus getNValues(int n) = 0;
virtual GStatus isDiscount(char* custId, double, int* ) = 0;
};
#endif /* defined(__GBookStore__GBookStore__) */
#ifndef __GBookStore__GBookStore__
#define __GBookStore__GBookStore__
/*
Declaring Wrapper Class for Book Store Class to enable
interaction with other classes or interfaces
*/
class GBookStore
{
private:
ABookStore *mABookStore; // pointer to Abstract class used to store address of child class
public:
GBookStore(); // constructor of GStoreClass
~GBookStore(); // destructor of GStoreClass
GStatus readPriceList(char* filename); //calls child class readPriceList
GStatus readTransactionList (char* filename);// calls child class
//readTrasactionList
GStatus getNValues(int n); //calls child class getNValues
GStatus isDiscount(char* custId, double, int* ); //calls child class isDiscount
};
#endif /* defined(__GBookStore__GBookStore__) */