Elevator::Elevator(const int cap, const int s, const Floor& tFloor)
: ID(elevatorID++), capacity(cap), speed(s), toFloor(0) // initialize const data members
{
  location = tFloor.getLocation();
  direction = IDLE;
  doorOpen = true;
} // end Elevator class constructor
Exemple #2
0
Elevator::Elevator(const int cap, const int spd, const Floor& startFloor)
  : ID(Elevator::elevatorID), capacity(cap), speed(spd), toFloor(0)
{
  elevatorID++;
  location = startFloor.getLocation();
  direction = IDLE;
  doorOpen = true;
}
Exemple #3
0
//create constructors
Elevator::Elevator(const int space, const int spd, const Floor& start):ID(elevatorID), capacity(space), speed(spd),toFloor(0){
	location = start.getLocation();
	direction = IDLE;
	doorOpen = true;
}