The objective is to write a program that will identify which elevator will be served once a request for an elevator is registered.
- An elevator is requested by default from top floor.
- An elevator can be resting at a given floor, going up or going down.
- An elevator switch automatically his direction when reaching the edges of the building (means the first and top floors).
- An elevator can not switch his direction in the middle of a building.
Example: in a building of 10 floors, an elevator at the 3rd floor and ascending can never go down before reaching the 10th floor. And vice versa.
- An elevator is never in between floors.