Assignment Description: The Elevator Problem buildings considera 2-storey building with 1 elevator. Your program should simulate the movement of the elevator which is dependent on the buttons that are pressed inside and outside the elevator. Your program should include the following features
- Indicator monitoring the no.of passengers inside the elevator;
- Going up and going-down buttons outside the elevator for each floor
- Cose door and open door buttons inside the elevator,
- Emergency button inside the elevator in case of emergency, and
- A timer for the time elapsed to travel to the 2 floors,
Before the elevator moves, the program should ask for the no of passengers who are going to ride the elevator and prohibits over capacity The no of passengers inside the elevator should be limited to 5 persons only; an alarm is triggered when it exceeds the loading capacity.
Furthermore, the program should monitor how many passengers went out the elevator, still in the elevator and coming inside the elevator. Therefore, the elevator should only move whenever the door is closed and it has the ideal no passengers
When the emergency button is pressed, the elevator should trigger an alarm and stops. When the alarm is off, the elevator can continue moving up or moving down.
Finally the elevator should remain until a a is made for its senice, then idle request for and continue to operate until all requests have been satisfied.
You should use 2D graphics function in drawing your object and minimize the use of predefned images.