-
Notifications
You must be signed in to change notification settings - Fork 8
/
Waiter.h
51 lines (45 loc) · 1.23 KB
/
Waiter.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
#ifndef __WAITER_H__
#define __WAITER_H__
#include "Person.h"
#include "Boss.h"
class CWaiter: public CPerson{
private:
unsigned short m_unNumber; //编号
double m_dAchievement; //业绩
double m_dSalary; //工资
static double m_dAllSalary; //所有服务员的工资
static unsigned short m_unWaiterCount; //服务员人数
public:
CWaiter * pNextWaiter;
public:
CWaiter(const unsigned short &unNumber,
const double &dSalary,
const string & strName="",
const string & strSex="",
const double & dAchievement=0);
~CWaiter(){
m_unWaiterCount--;
}
void StartUsingBoard()const;
//取得自己的编号
unsigned short GetNumber()const;
//取得自己的业绩
double GetAchievement()const;
//取得自己的工资
double GetSalary()const;
//给餐桌点餐
bool AddBoardMenuItem(CBoard *pBoard,
CFoodMenu * pFood,
const unsigned &uShare);
//删除已点菜肴
bool DelBoardMenuItem(CBoard * pBoard);
static unsigned short GetWaiterCount(){
return m_unWaiterCount;
}
friend bool CBoss::SetWaiterSalary(CWaiter **ppWaiter,
const unsigned short &unNumber,
const double & dSalary)const;
friend bool CBoss::SetWaiterSalary(CWaiter * pWaiter,
const double & dSalary)const;
};
#endif /*__CWAITER_H_*/;