-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDeptartment.h
65 lines (40 loc) · 1.03 KB
/
Deptartment.h
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
#ifndef STUSYSTEMGUI_DEPTARTMENT_H
#define STUSYSTEMGUI_DEPTARTMENT_H
#include<iostream>
using namespace std;
class Deptartment {
private:
//系id
int did;
//系名
string name;
//系主任
string director;
//系容量
int capcity;
//
//现有容量
int num;
public:
//构造函数,did自增
Deptartment(const string& name, const string& director, int capcity, int num);
//无参构造
Deptartment();
int getDid() const;
void setDid(int did);
const string& getName() const;
void setName(const string& name);
const string& getDirector() const;
void setDirector(const string& director);
int getCapcity() const;
void setCapcity(int capcity);
int getNum() const;
void setNum(int num);
//重载==运算符
bool operator==(const Deptartment& rhs) const;
//重载!=运算符
bool operator!=(const Deptartment& rhs) const;
//重载<<
friend ostream& operator<<(ostream& os, const Deptartment& deptartment);
};
#endif //STUSYSTEMGUI_DEPTARTMENT_H