?? room.h
字號:
/*
* File: room.h
* ----------------
* This file contains some declarations about the room info.
*/
#ifndef ROOM_H
#define ROOM_H
#include "base.h"
#include "account.h"
//#define MAXFURN 10 // add
//#define NUMOFPT 3
//#define NUMOFRS 4
/*
struct Furniture // add ..
{
string furnName[MAXFURN];
int oNum[MAXFURN];
int cNum[MAXFURN];
};
*/
enum RoomState{CLEAN,INUSE,NEEDFIX,NEEDCLEAR};
enum RoomType{SINGLE,DOUBLE,TRIPLE,SUITE};
/*
* Class: room
* ----------------
* This class contains all the room's
* info and operation functions.
*/
class Room
{
public:
Room(); // constructor.
void SetInfo();
void SetRoomNum( int );
void SetRoomType( RoomType );
void SetBusinessNum( int );
void SetRoomPrice( int );
void SetChargingHours( int );
void SetCustomerName( string );
void SetCustomerID( int );
void SetStartDate( int = 0, int = 0, int = 0 );
void SetStartTime( int = 0, int = 0, int = 0 );
void SetDealPrice( int );
void SetRoomState( RoomState );
int GetCurExpences();
int GetRoomNum();
int GetCustomerID();
//Date *GetStartDate();
//Time *GetStartTime();
RoomState GetRoomState();
string GetRoomCustomerName();
void PrintInfoBrief(); // print the room info briefly..roomNum..roomType..roomState.
void PrintInfo(); // print the room info in detail.
void WriteToFile( ofstream *fout );/// // write the room info to the data file.
void ReadFromFile( ifstream *fin );/// // read the room info from the data file.
~Room(); // destructor.
private:
int roomNum;
RoomType roomType;
int businessNum;
int roomPrice;
int chargingHours; //how many hours pay once roomPrice
string customerName;
int customerID;
Date startDate;
Time startTime;
int dealPrice;
RoomState roomState;
};
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -