现在的位置: 首页 > 综合 > 正文

我的第一个小项目

2013年10月18日 ⁄ 综合 ⁄ 共 1042字 ⁄ 字号 评论关闭
hotel.h #ifdef HOTEL_H #define HOTEL_H ///////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////// int menu(); //菜单选项 void add_hotel(); //增加酒店 void add_list(); //增加定单 void sum_list(); //取消定单 void findcty(); //查找城市 ////////////////////////////////////////////////////////////////////////// class Hotel { private: int No; //酒店编号 string name; //酒店名称 string cty; //所在城市 int total_room; //总房数 int proom; //普通房数 int proom_empty; //普通空房数 double proom_money; //普通房价 int hroom; //高级房数 int hroom_empty; //高级空房数 double hroom_money; //高级房价 public: Hotel(); //初始化对象属性 ~Hotel(); //析构函数 void input(); //输入酒店信息 int turn(bool a); //根据布尔值返回空房间数目 void Dingdan(int strct,int strnum); //来定单时,修改对象基本属性 void output(); //输出酒店信息 void unDingdan(int strct,int strnum); //取消单时,修改对象基本属性 string turnname(){return name;} //返回酒店名称 string turncty(){return cty;} //返回城市名字 int num(int number){No=number;} //生成编号 ///////////////////////////////////////////////////////////////////////// friend ostream& operator << (ostream &out,Hotel &hot) { out <<<" "<<<" "<<<" "<<<" "<<<" "<<<" "<<<" "<<<" "<<<" "<<

抱歉!评论已关闭.