-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathheader.h
More file actions
110 lines (96 loc) · 1.78 KB
/
header.h
File metadata and controls
110 lines (96 loc) · 1.78 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#ifndef HEADER_H_INCLUDED
#define HEADER_H_INCLUDED
#include<iostream>
#include<string>
#include<fstream>
#include<time.h>
#include<string.h>
#include<sstream>
#include<stdlib.h>
using namespace std;
class Product
{
private:
float price;
int quantity;
int Stock_no;
string name;
public:
Product();
void purchase();
int checkstock();
void bill();
float get_price();
void set_price(float);
int get_quantity();
void set_quantity(int);
int get_stock();
void set_stock(int);
string get_name();
void set_name(string);
~Product(){};
};
class Drinks:public Product
{
public:
Drinks(){};
~Drinks(){};
};
class Chocolates:public Product
{
public:
Chocolates(){};
~Chocolates(){};
};
class Chips:public Product
{
public:
Chips(){};
~Chips(){};
};
class Bill
{
private:
float totalamount;
public:
Bill(){};
float get_totalamount();
void Calculate(Drinks [10],Chocolates [10],Chips [10]);
void display_bill(Drinks [10],Chocolates [10],Chips [10],float balance);
~Bill(){};
};
class Cash_dispencer
{
private:
int balance;
public:
Cash_dispencer(){};
int get_balance();
int checkBalance(char [],Bill);
~Cash_dispencer(){};
};
class Transaction
{
private:
string card_no;
string cvv;
public:
Transaction(){};
int checkCard(char [] ,char []);
~Transaction(){};
};
class VendingMachine
{
public:
Drinks Dr[10];
Chocolates Ch[10];
Chips Cp[10];
Product P;
VendingMachine(){};
VendingMachine(Product &P1):P(P1){};
Cash_dispencer C;
Transaction T;
void display_cart();
~VendingMachine(){};
};
#endif // HEADER_H_INCLUDED