-
Notifications
You must be signed in to change notification settings - Fork 1
/
Lab_12.cpp
82 lines (55 loc) · 1.77 KB
/
Lab_12.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#include <iostream>
#include <string>
#include <cstring>
using namespace std;
class Client
{
public:
Client()
{
}
Client(string ipAddress, int homeIndex, const char* digest)
{
}
Client(const Client& client)
{
}
Client& operator=(const Client& client)
{
return *this;
}
std::string getIpAddress()
{
}
int getHomeIndex()
{
}
const char* getDigest()
{
}
void setIpAddress(std::string const ipAddress) { }
void setHomeIndex(int homeIndex) { }
void setDigest(const char* digest)
{
}
~Client()
{
}
private:
};
int main()
{
Client c1("192.168.1.20", 0, "dcd98b7102dd2f0e8b11d0f600bfb0c093");
Client c2("192.168.1.22", 4, "5ccc069c403ebaf9f0171e9517f40e41");
Client c3("192.168.1.25", 20, "6629fae49393a05397450978507c4ef1");
cout << c1.getIpAddress() << " " << c1.getHomeIndex() << " " << c1.getDigest() << endl;
cout << c2.getIpAddress() << " " << c2.getHomeIndex() << " " << c2.getDigest() << endl;
cout << c3.getIpAddress() << " " << c3.getHomeIndex() << " " << c3.getDigest() << endl;
Client c4 = c1;
c2 = c4;
cout <<"\n"<< c1.getIpAddress() << " " << c1.getHomeIndex() << " " << c1.getDigest() << endl;
cout << c2.getIpAddress() << " " << c2.getHomeIndex() << " " << c2.getDigest() << endl;
cout << c3.getIpAddress() << " " << c3.getHomeIndex() << " " << c3.getDigest() << endl;
cout << c4.getIpAddress() << " " << c4.getHomeIndex() << " " << c4.getDigest() << endl;
return 0;
}