Design an Elevator System — Concept Check
Questions on Design an Elevator System. Model a multi-elevator system with a controller that schedules requests using the LOOK algorithm and tracks each elevator as a state machine.
Questions in this quiz
7 questions on Design an Elevator System — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.An elevator in a multi-elevator system is currently at the 5th floor, moving up, with requests for the 7th and 10th floors. A new request comes in for the 3rd floor. What will the elevator do next?
- AReverse direction immediately to serve the 3rd floor
- BContinue to the 7th floor, then serve the 3rd floor after reversing direction
- CIgnore the 3rd floor request as it is moving up
- DServe the 3rd floor request after reaching the 10th floor
2.Which state does an elevator transition to if it is idle and receives a request for a higher floor?
- AMovingDownState
- BIdleState
- CMovingUpState
- DDoorsOpenState
3.A user presses the hall button to go down from the 8th floor. The nearest elevator is idle at the 5th floor. What happens next?
- AThe idle elevator at the 5th floor will be dispatched
- BThe system waits for an elevator moving down
- CThe request is ignored until an elevator is free
- DThe elevator at the 5th floor will move up first
4.What is the role of the Observer pattern in the elevator system?
- ASchedule elevators based on requests
- BNotify listeners when doors open or close
- CManage the state transitions of elevators
- DDetermine the direction of elevator movement
5.Why might an elevator ignore a request for a floor below its current position while moving up?
- AThe LOOK algorithm services requests in the current direction first
- BElevators only handle one request at a time
- CRequests from lower floors are always ignored when moving up
- DThe system is designed to minimize energy consumption
6.An elevator is moving down with requests for the 3rd and 1st floors. It receives a new request for the 5th floor. What will happen?
- AThe elevator will immediately reverse to serve the 5th floor
- BThe elevator will continue down and serve the 5th floor after reversing
- CThe elevator will stop at the 5th floor on its way down
- DThe request for the 5th floor will be ignored
7.In a multi-elevator system, what happens if two elevators are equidistant from a requested floor?
- AThe scheduler may choose any elevator based on other factors
- BThe request will be ignored until one elevator is closer
- CBoth elevators will move towards the request
- DThe system will randomly select one elevator to respond