Java第五次作业

Final Project

We encourage you to simulate a lift system with 100 stops (100 floors). We assume every customer takes 1 second to enter the lift and 1 second to leave. The lift’s occupation space is 13 people with no weight limit. It takes 10 seconds for the lift to travel between two nearby floors without discrimination for going up or going down. An input file will be given to you which simulates the coming customer randomly. Here is a DEMO inputs:

 

Customer ID

Coming time

Age

Source floor

Destination floor

Leaving time

21

123

65

2

9

 

2

16

45

80

5

 

4

382

14

1

99

 

 

The customer coming time is not sorted, so you need to sort them first. Also one rule need to be noted is that for those customer whose “age” larger than 60, they will get the highest privilege to enter and leave the lift without waiting in the queue. We encourage you to use different data structures at different floors. The sorting algorithm will be appointed to use during the free time. The output will be a file similar to the input file with calculated/simulated leaving time filled in (to the last column).

Req:

@ two weeks later delivery operation(until 4.21)

@ using java's encapsulation,inheritance and polymorphism technique

@ according with "open and close" principle

@ maybe using ArrayList ,LinkedList and Stack etc. class and sort method,study them yourself

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值