-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMain.cpp
60 lines (46 loc) · 1.01 KB
/
Main.cpp
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
#include "TaxOffice.h"
int main()
{
Residence a1("Addr1", 80);
Residence a2("Addr2", 90);
Residence a3("Addr3", 110);
Residence a4("Addr4", 110);
Residence a5("Addr5", 360);
if (a1 == a2)
{
cout << "A1 is equal to A2" << endl;
}
else if (a2 > a2)
{
cout << "A1 is bigger to A2" << endl;
}
else
{
cout << "A1 is smaller to A2" << endl;
}
vector<Residence*> res;
res.push_back(&a1);
res.push_back(&a2);
res.push_back(&a3);
Declaration d2("yyy", 70);
Declaration d1("xxx", 28, res);
d2.addResidence(&a4);
d2.addResidence(&a5);
d1.display();
d2.display();
cout << endl;
cout << ((d1.Area300()) ? "Extra real estate tax" : "No extra tax") << endl;
cout << "Totaltax = " << d1.TotalTax() << endl;
TaxOffice taxoff("Athens");
taxoff.addDeclaration(d1);
taxoff.addDeclaration(d2);
vector<Declaration> dd;
dd = taxoff.Taxup2000();
cout << "Declarations with total tax more than 2000\n";
for (unsigned i = 0; i < dd.size(); i++)
{
dd.at(i).display();
}
system("pause");
return 0;
}