servertype.h

来自「模拟银行(也可以其他类似)一天的营运光顾情况。」· C头文件 代码 · 共 19 行

H
19
字号
#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 + =
减小字号Ctrl + -
显示快捷键?