-
Notifications
You must be signed in to change notification settings - Fork 0
/
Port.cpp
53 lines (36 loc) · 940 Bytes
/
Port.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
#include "Port.h"
Port::Port()
{
this->name=" ";
this->departure_time="00/00/00";
this->arrival_time="00/00/00";
}
Port::Port(const std::string& name,const std::string& arrival_time,const std::string& departure_time)
{
this->name=name;
this->arrival_time=arrival_time;
this->departure_time=departure_time;
}
Port::Port(const Port& source)
{
this->name=source.name;
this->arrival_time=source.arrival_time;
this->departure_time=source.departure_time;
this->outbound=source.outbound;
}
Port& Port::operator=(const Port& source)
{
if(this!=&source)
{
this->name=source.name;
this->arrival_time=source.arrival_time;
this->departure_time=source.departure_time;
this->outbound=source.outbound;
}
return *this;
}
bool Port:: operator==(const Port& source){return (this->name==source.name);}
bool Port::operator!=(const Port& source){return!(this->name==source.name);}
Port::~Port()
{
}