-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChatAdmin.cpp
More file actions
59 lines (49 loc) · 940 Bytes
/
ChatAdmin.cpp
File metadata and controls
59 lines (49 loc) · 940 Bytes
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
#include "ChatAdmin.h"
#include <iostream>
using namespace std;
ChatAdmin::ChatAdmin() : ChatUser()
{
//work = nullptr;
salary = NULL;
}
ChatAdmin::ChatAdmin(string _work, int _salary, string _username, int _password, string *_friends, int _friendscounter) : ChatUser(_username, _password, _friends, _friendscounter)
{
work = _work;
salary = _salary;
}
ChatAdmin::ChatAdmin(ChatAdmin&ob) : ChatUser(ob)
{
salary = ob.salary;
work = ob.work;
}
void ChatAdmin::Show()const
{
ChatUser::Show();
cout << "* Work: " << getWork();
cout << "\n* Salary: " << getSalary();
cout << endl;
}
void ChatAdmin::setWork(string _work)
{
work = _work;
}
void ChatAdmin::setSalary(int _salary)
{
salary = _salary;
}
string ChatAdmin::getWork()const
{
return work;
}
int ChatAdmin::getSalary()const
{
return salary;
}
int ChatAdmin::doCalculateSalaryForYear() const
{
return salary * 12;
}
ChatAdmin::~ChatAdmin()
{
salary = NULL;
}