forked from IT1050-2022-Feb/ooc-project-it21203008
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathit21203008
116 lines (87 loc) · 2.21 KB
/
it21203008
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
111
112
113
114
115
116
Seller.h
#include "RegisteredCustomer.h"
#include "Vehicle.h"
#define SIZE 5
class Seller :
public RegisteredCustomer
{ private:
int noOfVehicles;
Vehicle* sellVhcl[SIZE];
public: Seller();
Seller(const char usName[], const char usPwd[], int id, const char name[], const char address[], const char email[], const char telno[], int pnoOfVehicles);
void addSellingVehicle(Apartment* psellVhcl);
void login();
void displaySellerDetails();
~Seller();
};
Buyer.h
#include "RegisteredCustomer.h"
#include "Vehicle.h"
#define SIZE 5
class Buyer :
public RegisteredCustomer
{
private:
int noOfVehicless;
Vehicle* buyVhcl[SIZE];
public: Buyer();
Buyer(const char usName[], const char usPwd[], int id, const char name[], const char address[], const char email[], const char telno[],int pnoOfVehicles);
void addBuyingVehicle(Vehicle* pbuyVhcl); void login();
void displayBuyerDetails();
~Buyer();
};
Seller.cpp
#include "Seller.h"
Seller::Seller()
{
noOfVehicles = 0;
}
Seller::Seller(const char usName[], const char usPwd[], int id, const char name[], const char address[], const char email[], const char telno[], int pnoOfApartments) :RegisteredCustomer(usName,
usPwd, id, name, address, email, telno)
{
noOfVehicles = pnoOfVehicles;
}
void Seller::addSellingVehicle(Vehicle* psellVhcl)
{
if (noOfVehicles < SIZE)
{
sellVhcl[noOfVehicles] = psellVjcl;
noOfVrhicles++;
}
}
void Seller::login()
{
}
void Seller::displaySellerDetails()
{
}
Seller::~Seller()
{
//Destructor
}
Buyer.cpp
#include "Buyer.h"
Buyer::Buyer()
{
noOfApartments = 0;
}
Buyer::Buyer(const char usName[], const char usPwd[], int id, const char name[], const char address[], const char email[], const char telno[], int pnoOfApartments):RegisteredCustomer(usName,usPwd, id, name, address, email, telno)
{
noOfVehicles = pnoOfVehicles;
}
void Buyer::addBuyingVehicle(Vehicle* pbuyVhcl)
{
if (noOfVehicles < SIZE)
{
buyApt[noOfVehicles] = pbuyVhcl;
noOfVehicles++;
}
}
void Buyer::login()
{
}
void Buyer::displayBuyerDetails()
{
}
Buyer::~Buyer()
{