📄 simulator.cpp
字号:
#include <iostream.h>
#include <stdlib.h>
#include "Manager.h"
class Simulator{
public:
Simulator(){}
void doSimulation(int time, int rooms)
{
//as soon as i use loop, the problem is stuck!
Manager a;
a.initialize(rooms);
a.reserve(time,rooms);
a.cancel(rooms);
a.rooms_status();
a.end_status();
}
};
void main(void)
{
Simulator s;
int time_to_run;
int number_of_rooms;
cout << "Please input the time you wish to run(between 1 to 10):";
cin>>time_to_run;
cout << "Please input the total rooms number in your hotel(between 1 to 100): ";
cin>>number_of_rooms;
s.doSimulation(time_to_run, number_of_rooms);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -