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

📄 elevator.h

📁 某国际贸易中心共有40层
💻 H
字号:
# ifndef _ELEVATOR_H
# define _ELEVATOR_H

# include "elevsim.h"
# include "floor.h"
# include "person.h"

class elevator
{
  int elevNumber;
  int timeToAction;
  int floorNumber;
  bool stopped;
  direction dir;
  bool buttons[MAXFLOORS];
  int passengers;
  bool buttonUp(void);
  bool buttonDown(void);
  public:
    elevator();
    int getPassengers(void) {return passengers;}
    void (SetelevNumber)(int n) {elevNumber=n;}
    void showElevator(void);
    void SetDirection(floorSet &floors);
    bool elevStopping(floorSet &floors);
    void action(floorSet &floors,perSet &persons);
};

class elevSet
{
  elevator ea[MAXFLOORS];
  public:
    elevSet();
    void showElevators(void);
    void action(floorSet &floors,perSet &persons);
    int avgRiding(void);
};

# endif

⌨️ 快捷键说明

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