剑知北美生活快报   版面列表   admin登录
JiansNet Logo


Solution To Interview Question: Design An Elevator System

by JC, published: 2011-08-18 17:51 viewed: 8686 times
想了解更多的美国生活窍门?请订阅: JC写的剑知北美生活快报。
This is a frequently asked question during job interview. The question is, "how do you design a control system for an elevator bank, Assume the controller is receiving messages as text, and sends messages as text. list the objects/methods."

This interview question is very simple to ask but surprisingly difficult to get right. It might involves things like queues and can easily be extended to throw in more challenges. For example, how to reduce wait times, etc.

I should say that this type of interview questions is to test if someone has the right attitude and interest. By asking how they do anything, it will tell you how good they are.

A possible answer to this interview question is as follows.

Elevator class: it has states such as up/down/stand/maintenance, current floor, list of floor requests sorted in the direction.

Elevator bank class: contains elevators and receives requests from the floors. It has scheduling such as:
if available pick a standing elevator for this floor.
else pick an elevator moving to this floor.
else pick a standing elevator on an other floor.
else pick the elevator with the lowest load.

To solve similar problems like this, some computer science interview books on data structures and algorithms could be very helpful. See My List of Recommended Interview Books for more info.
Comments (2)
1. visitor 2011-02-14 06:01
This interview question could use command pattern. The receiver of the command are the elevators. But, the command class/objects are missing in your design.
2. JC 2011-08-18 17:51
To be frank, I hate this type of "design a system for elevators" type of questions. Instead, I more like algorithm or data structure questions, or performance related questions.
本文版权属于美国剑知信息网。如需转载,请先同我们联系。
订阅JC写的剑知北美生活快报,您会了解到更多的美国生活窍门。
Related Articles:
• Best Computer Science Interview Books
• Top IT Skills and Salaries In USA
• Computer Science Interview Question - Two Eggs And 100 Story Building
美国职业发展 | 返回顶部 | 返回首页
About Us | Advertise with Us | Privacy Policy
Copyright © 2007-2016, All Rights Reserved.