TrustArc interview question

Code an elevator simulator in java.

Interview Answer

Anonymous

22 Sept 2010

There are two schedules, Up schedule and down schedule. There are two concurrent threads (calls coming inside and outside of the elevator). Schedules are arrays. Elevator checks a boolean for each floor to stop or continue. Can be implemented in different ways. However, the time that they give is a little bit short.