t**********g 发帖数: 3388 | 1 看网上莫衷一是
[发表自未名空间手机版 - m.mitbbs.com] |
t**********g 发帖数: 3388 | 2 这题臭名昭著的常见
[发表自未名空间手机版 - m.mitbbs.com] |
p*****2 发帖数: 21240 | |
t******i 发帖数: 483 | |
a*****u 发帖数: 1712 | |
x*********s 发帖数: 2604 | 6 设计电梯其实跟设计server是一个道理,用户就是client,每按一次电梯键就是一个
request然后电梯做出response。然后你知道该怎么设计了吧? |
s*******n 发帖数: 305 | 7 感觉象是贯穿 《JAVA HOW TO PROGRAM》 那本书的设计题 |
p*****2 发帖数: 21240 | 8
题目我也不太清楚。
【在 a*****u 的大作中提到】 : 我一直不知道题目是什么
|
c********p 发帖数: 1969 | |
n*****a 发帖数: 55 | 10 是这题吗?
A new 101-floor hotel want to construct the most futuristic, efficient
building in the world.
Specifically, you've been tasked with writing a simulation that takes as
input a file in this format:
time,start_floor,dest_floor
0,1,4
0,0,43
1,43,100
…
Each input line represents a guest pushing the button to request an elevator
at a specific time. start_floor is the floor (0-100) from which they are
requesting an elevator and dest_floor is the destination floor (0-100) they
want to go. This being a space-age system, guests enter their destination
floor into a keypad before the elevator is requested. print the average
wait time and the standard deviation of the wait time for all customers,
where wait time is defined as the number of seconds elapsed between when a
guest pushes the request button and arrives at a destination floor. Eg:
average wait time = 35
standard deviation = 2.4
Other details:
The building has four elevators
Elevators travel one floor per second
Elevator doors open for 10 seconds
Elevators start the simulation at floor 1
The busiest floors are floor 0 (garage), 1 (street entrance), 10 (lobby)
and the top floor 100.
【在 a*****u 的大作中提到】 : 我一直不知道题目是什么
|
|
|
j*t 发帖数: 184 | 11 MVC Model?
【在 x*********s 的大作中提到】 : 设计电梯其实跟设计server是一个道理,用户就是client,每按一次电梯键就是一个 : request然后电梯做出response。然后你知道该怎么设计了吧?
|
x*****0 发帖数: 452 | |
h***u 发帖数: 9 | |
L*******e 发帖数: 114 | 14 我也栽在这个上了。需要提前准备,要不面试那短时间,很难想出一个好的办法。 |
f*******b 发帖数: 520 | |
b**********5 发帖数: 7881 | 16 我被问过这题。 问的时候, 就一句: how to design an elevator bank. |
d***n 发帖数: 832 | 17 这题以前被问过,当时是随意发挥
感觉面试官也没有固定答案但还算满意我的回答
前面有人说是client/server,那你得设计server side怎么做
当时我给了一个object model并大概pseudo code实现了关键的几个class
还有需求也是我当时定义的,就是说
你设计的电梯应该是什么样子有什么功能等
感觉当时面试官对这个也比较重视
这题太open,不同的面试官期待的东西不一样
最好能试探或感应一下面试官想要什么 |
a****n 发帖数: 1887 | 18 我的一点理解:
1. define users/roles
2. define domain boundaries
3. define use cases
以上都是communication的部分
4. define the interfaces (cross boundaries)
5. design your architecture.
其他相关的也可以谈谈, 例如 Test Driven Development,domain/model driven
design, use cases driven design 等等 |