-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCountry.cpp
More file actions
56 lines (40 loc) · 1.38 KB
/
Country.cpp
File metadata and controls
56 lines (40 loc) · 1.38 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
#include "Country.h"
// Default Constructor
Country::Country( string name, unsigned days ) : name(name), days(days) {
}
// Copy Constructor
Country::Country(const Country& copy) : name(copy.name), days(copy.days) {
std::cout << "copying " << copy.name << endl;
}
// Destructor
Country::~Country() {
}
// Get Country name
string Country::getName() const {
return name;
}
// Get Country Days
unsigned Country::getDays() const {
return days;
}
// Set Days in Country
void Country::setDays(unsigned days) {
this->days = days;
}
// // Overload operators for vertex ordering
// bool operator<( const Country& lhs , const Country& rhs ) {
// if (lhs.getDays() != rhs.getDays())
// return lhs.getDays() < rhs.getDays();
// else
// return lhs.getName() < rhs.getName();
// }
// bool operator>( const Country& lhs , const Country& rhs ) {
// return rhs < lhs; //return counterpart overload
// }
// // Overload operators for vertex identification
// bool operator==( const Country& lhs , const Country& rhs ) {
// return lhs.getName() == rhs.getName();
// }
// bool operator!=( const Country& lhs , const Country& rhs ) {
// return !(lhs.getName() == rhs.getName());
// }