-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathFoodMenu.h
40 lines (38 loc) · 1.2 KB
/
FoodMenu.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
#ifndef __FOODMENU_H__
#define __FOODMENU_H__
#include <string>
#include "Macro.h"
using std::string;
//////////////////////////////////////////////////////////////////////////
// 菜肴的基本信息:名称和价格
//
//////////////////////////////////////////////////////////////////////////
typedef struct{
unsigned m_uFoodType;
string m_strFoodName;
double m_dPrice;
}Food;
//////////////////////////////////////////////////////////////////////////
// 餐厅主菜单类
// 这个类的对象里包括了菜肴和下一个菜肴的地址
// 由它构成的链表储存了餐厅的所有菜肴
//////////////////////////////////////////////////////////////////////////
class CFoodMenu{
public:
Food m_Food;
CFoodMenu * m_NextFood;
static unsigned short m_unFoodCount;
};
//////////////////////////////////////////////////////////////////////////
// 某个餐桌的菜单,继承于主菜单类
// 增加了属性域:某种菜肴的份数,某种菜肴的消费额
// 由它构成的链表储存了一个餐桌所点的所有菜肴
//////////////////////////////////////////////////////////////////////////
class CBoardMenu :public CFoodMenu{
public:
unsigned m_uShare;
double m_dMoney;
unsigned short m_unWaiterNumber;
CBoardMenu * m_pNextBoardFood;
};
#endif//__FOODMENU_H__