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
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; }
//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; }