-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlab1.cpp
28 lines (25 loc) · 850 Bytes
/
lab1.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
#include <iostream>
#include "libs/Money.hpp"
#include "libs/Person.hpp"
using namespace std;
int main()
{
cout << Money(11, 50) << endl;
cout << Money(-11, 50) << endl;
cout << Money(20, 50) + Money(11, 50) << endl;
cout << Money(20, 50) + Money(-11, 50) << endl;
cout << Money(-20, 50) + Money(11, 50) << endl;
cout << Money(20, 50) - Money(11, 50) << endl;
cout << Money(20, 50) * 3 << endl;
cout << Money(20, 50) / 4 << endl;
cout << (Money(20, 50) > Money(11, 50)) << endl;
cout << (Money(20, 50) > Money(20, 51)) << endl;
cout << (Money(20, 50) == Money(20, 50)) << endl;
Person test("Jon", "Smith");
cout << test << endl;
cout << test.get_money() << endl;
test.add_money(Money(20, 50));
cout << test << endl;
test.decrease_money(Money(11, 50));
cout << test << endl;
}