问题 问答题

【说明】
下面是某租车信息管理系统的介绍:该车库中备有若干车辆,每辆车有车号、车牌、车名、价格等属性。车库不定期地购买并注册新车供用户借用,也可将报废的旧车注销以停止租用。
车库可为众多用户提供服务。每个用户在借车之前需注册姓名、地址等内容。每个用户最多可同时借3辆车。每辆车借期7天:若有一辆车超期,则不可再借其他车。一辆车超期一天罚款250元。若一辆车超期3周不归还,则发布通告。若用户借的车丢失,在罚款处理之前不能借车,每辆报失的车罚款该车目前市价(包括折旧)的1.2倍。注册新用户不受限制;而注销用户之前,该用户必须归还所有借的车,或者报失并接受罚款。
【状态图1】


【状态图2】


1. 【问题1】
分析车辆的状态和事件,指出图2-1中的(1)、(2)、(3)、(4)分别是什么

答案

参考答案:cancel register(注销用户的注册)
(6)borrow/n+1(借车/拥有车的数量+1)
(7)penalty and n=0(罚款并且拥有车的数量为0)
(8) 3

解析:

[分析]:根据题意“注销用户之前,该用户必须归还所有借的车,或者报失并接受罚款”,得出从“No Car’’到终结状态的事件(5)空是cancel register(注销用户的注册)。根据从“No Car”到“Has Car”的事件(6)空是borrow(借车),同时已知用户可以借多辆车,当前拥有车n辆,所以需要n+1。根据“若用户借的车丢失,在罚款处理之前不能借车”可知(7)空是penalty(罚款),同时状态从“Has Car”到达“No Car”说明n=0。根据“每个用户最多可同时借3辆车”,可以得出(8)空为3。

阅读理解

根据短文内容填空,每空不超过4个单词。

Mr. Clarke joined the army when he was eighteen. Four years later he came back to his hometown and found work in a post office. He worked hard but he liked drinking and it brought him a lot of trouble. One day he drank too much and lost a mailbag and he was soon sent away. He couldn’t find any work in the town and he had to beg(乞讨) in the street. Now his clothes are dirty and broken and sometimes he’s hungry. 

One morning he was begging at the station. He saw a woman in beautiful clothes come out by the exit. He went close to her and hoped that she gave him some money. The woman had a look at him and hurried to cover her nose with her hand.

“It seems that you have come from the hell(地狱).” The woman called out.

Mr. Clarke understood she was such a woman who never helped the poor and said, “You’re right, madam. I’m really from the hell.”

“Why not stay there, then?”

“There is no room for the poor people like me.” said Mr. Clarke.  “Only the rich men live there!”

小题1:When he was 22, Mr. Clarke found a job in a _______________.

小题2:Mr. Clarke was sent away because he lost                .

小题3:Sometimes Mr. Clarke is hungry because he has nothing              .

小题4:The woman hurried to             her nose because she thought Mr. Clarke was dirty.

小题5:Mr. Clarke’s words meant that the hell was only for the             like the woman.

单项选择题 A1/A2型题