Code:
//...syntax error...
int Elevator::getMinFloor() const
{
return(_MinFloor)
}
//...code does nothing plus returns nothing..
bool Elevator::getDoorStatus() const
{
_DoorStatus = false;
_DoorStatus = true;
}
//...forget something?
void Elevator::setMinMaxFloors(int minFloor, int maxFloor)
{
}
//...it says "print" not alter...
void Elevator::printDoorStatus()
{
if(_doorOpen)
{
cout << "Open at floor " << _currentFloor << endl;
_doorOpen = false;
}
else
{
cout << "Doors are Closing" << endl;
_doorOpen = true;
}
}
Next:
Code:
//...This function shows the most minimal effort on your part...
void Elevator::move(int destinationFloor)
{
// check for valiation of the destinationFloor
// call validateFloor(destination)
if(destinationFloor > _currentFloor)
goUp(destinationFloor);
else if(destinationFloor < _currentFloor)
goDown(destinationFloor);
else
printDestinationFloor();
printDoorStatus();
// print the door status
}
This class is fully 100 lines less than it should be, shouldn't you be trying a little harder? I'd be glad to help, but then why reward laziness?