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

📄 servertype.h

📁 模拟银行(也可以其他类似)一天的营运光顾情况。
💻 H
字号:
#include"customertype.h"
class SErverType
{
private:
    char status[10];//"free" or "busy"
	CUstomerType currentcustomer;
	int transactiontime;
public:
	int GetTraTime();
	SErverType();//构造函数,当机构刚开门时将服务器改为free
	bool ServerIsFree();
    bool ServerIsBusy();
	void SetFree();//当transactiontime等于0时,即客户离开时,输出其离开时间,客户number,和将status改为free
	void SetBusy();//当一个客户来到服务器前时,将status改为busy
	void DecreaseTransactionTime();//每过一个时间单位,将服务器的transactiontime减一个单位
    void GetCustomer(CUstomerType cust);//一有客户来,将cust赋值给CurrentCustomer,特别是将顾客的transactiontime赋值给服务台。将status改为busy
};

⌨️ 快捷键说明

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