leaveevent.h
来自「数据结构」· C头文件 代码 · 共 37 行
H
37 行
#ifndef _leaveEvent
#define _leaveEvent
#include"event.h"
#include"simulation.h"
#include"customerGroup.h"
#include"storeSimulation.h"
#include<iostream.h>
class leaveEvent:public event//离开事件
{
public:
leaveEvent(unsigned int,customerGroup*);
virtual void processEvent();
private:
customerGroup* group;
};
leaveEvent::leaveEvent(unsigned int time1,customerGroup* gup):group(gup),event(time1)
{
}
void leaveEvent::processEvent()
{
int hours,minuters;
hours=time/60+8;
minuters=time%60;
cout<<hours<<"点"<<minuters<<"分钟"<<" "<<"有"<<group->groupsize<<"人离去."<<endl;
store.freeChairs+=group->groupsize;
}
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?