}
void FoodManager::addFood(char *s , double p) { food[total++]=Food(s,p); }
double FoodManager::getPriceByName(char *s) { for(int i = 0 ; i < total ; i ++) if(strcmp(food[i].getName(),s)==0) return food[i].getPrice(); return false; }
int FoodManager::getListByName(char *s) { for(int i = 0 ; i < total ; i ++) if(strcmp(food[i].getName(),s)==0) return i; return false; }
int FoodManager::getTotal() { return total; }
char * FoodManager::getNameByList(int list) { return food[list].getName(); }
void FoodManager::setTotal(int x) { total = x; }
FeeManager.h
#ifndef FEEMANAGER #define FEEMANAGER class FeeManager {
private: double jiuCanFee; //就餐总收入 double waiMaiFee; //外卖总收入 public: FeeManager(); //构造函数 double getWaiMaiFee(); //返回外卖总收入 double getJiuCanFee(); //返回就餐总收入
void addWaiMaiFee(double x); //增加外卖总收入 void addJiuCanFee(double x); //添加就餐总收入 }; #endif
FeeManager.cpp
#include\FeeManager::FeeManager() { jiuCanFee = 0; waiMaiFee = 0; }
double FeeManager::getWaiMaiFee() { return waiMaiFee; }
double FeeManager::getJiuCanFee() { return jiuCanFee; }
void FeeManager::addWaiMaiFee(double x) { waiMaiFee += x; }
void FeeManager::addJiuCanFee(double x) { jiuCanFee += x; }
MenuView.h
#ifndef MENUVIEW #define MENUVIEW class MenuView { private: char whiteSmile; //白色笑脸 char blackSmile; //黑色笑脸 char heart; //心形图形 public: MenuView(); //构造函数 void showJiuCan(); //显示就餐用户点菜界面 void showWaiMai(); //显示外卖用户点菜界面 int showMain(); //显示用户选择就餐还是外卖界面 int showViewChoice(); //显示进入本系统的功能选择界面 int showRegister(); //显示客户注册界面 int showClientChoice(); //显示客户点餐界面
int showQuery(); //显示查询客户订单界面 int showMend(); //显示修改食物界面 int showMenuChoice(); //显示选择菜单界面 int showMendDingDan(); //显示客户修改订单界面 }; #endif
MenuView.cpp
#include\#include
int MenuView::showMain() { for(int i = 1 ; i <= 80 ; i++ )cout< int choice; cin>>choice; return choice; } void MenuView::showJiuCan() { cout<<\欢迎就餐,本餐厅有以下食品供您品尝\} int MenuView::showViewChoice() { for(int i = 1 ; i <= 80 ; i++ )cout< int MenuView::showRegister() { cout<<\ cout<<\ 1:新顾客点餐 |\ cout<<\ 2:查询订单 |\ cout<<\ int next; cin>>next; return next; } int MenuView::showClientChoice() { cout<<\ cout<<\ 1:加菜 |\ cout<<\ 2:修改订单 |\ cout<<\ 3:提交订单 |\ cout<<\ int next; cin>>next; return next; } int MenuView::showQuery() { cout<<\ cout<<\ 1:查询订单 |\ cout<<\ 2:退出查询 |\ cout<<\ int next; cin>>next; return next; } int MenuView::showMend() { cout<<\ cout<<\ 1:添加食物 |\ cout<<\ 2:修改价格 |\ cout<<\ 3:删除食物 |\ cout<<\ 4:退出食物管理 |\ cout<<\ int next; cin>>next; return next; } int MenuView::showMenuChoice() { cout<<\添加菜单:\ cout<<\ cout<<\ 1:原菜单 |\ cout<<\ 2:更新后的菜单 |\ cout<<\ int next; cin>>next; return next; } int MenuView::showMendDingDan() { cout<<\ 百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库C++课程设计自助点餐系统(3)在线全文阅读。
相关推荐: