⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 account.h.bak

📁 命令行模式下的简单宾馆管理系统..各种基本功能齐全..属于新人练习作品..hotel manager..
💻 BAK
字号:
/*
 * File: account.h
 * ----------------
 * This file contains some declarations about the account info.
 */


#ifndef ACCOUNT_H
#define ACCOUNT_H

#include "base.h"
#include "room.h"
//#define NUMOFCCT 3


enum CreditCardType{STUDENTSCARD,IDENTITYCARD,OTHERS};	
enum Sex{MALE,FEMALE};	
enum PayType{PRE,CASH,CHECK};	

/*
 * Struct: AccRoomList
 * --------------------
 * This struct list contains all the 
 * rooms which this account in use.
 */
struct AccRoomList
{
	class Room *curRoom;
	struct AccRoomList *next;
};

/*
 * Struct: AccRoomNumList
 * ------------------------
 * This struct list contains the room numbers 
 * of all the rooms which this account in 
 * use.
 */
struct AccRoomNumList
{
	int roomNum;
	struct AccRoomNumList *next;
};

/*
 * Clasa: Account
 * ---------------
 * Thie class contains all the account's info 
 * and operation functions.
 */

class Account	//get an account
{
public:
	Account( int = 0, int = 0, int = 0 ,int = 0, int = 0, bool = false );	//constructor.
	void SetInfo();
	void SetID( int );
	void SetScore( int );
	void SetName( string );
	void SetSex( Sex );
	void SetCCardType( CreditCardType );
	void SetCCardNum( string );
	void SetAddress( string );
	void SetPhoneNum( int );
	void SetCurExpences( int );
	void SetPreExpences( int );
	int CheckExpences( Room * );
	bool GetNotEnoughExpences();
	void SetRemarks( string);
	int GetNumOfRooms();
	string GetName();
	string GetCCardNum();
	int GetPhoneNum();
	int GetID();
	int GetScore();
	int GetCurExpences();
	int GetPreExpences();
	struct AccRoomNumList *GetAccRoomNumList();
	void AddRoom( class Room * );		// add a room to the roomList.
	void DeleteRoom( class Room * );	// delete a room from the roomList.
	void AddRoomNum( int );		// add a room number to the roomNumList.
	void DeleteRoomNum( int );	// delete a room number from the roomNumList.
	void SetPayType( PayType );
	void PrintInfoBrief();		// print the account info briefly..ID..name..PhoneNum.
	void PrintInfo();			// print the account info in detail.
	void WriteToFile( ofstream *);///	// write the account info to the data file.
	void ReadFromFile( ifstream *);///	// read the account info from the data file.
	~Account();		// destructor.
private:
	int ID;
	int VIPLevel;
	int score;
	string name;
	Sex sex;
	CreditCardType cCardType;	//or creditCardType cCardType;
	string cCardNum;
	string address;
	int phoneNum;
	int curExpences;	// need init
	int preExpences;
	int notEnoughExpences;
	string remarks;
	PayType pType;
	int numOfRooms;	// need init///
	int numOfRoomNums;
	struct AccRoomList *roomList;
	struct AccRoomNumList *roomNumList;
	
};
#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -