问题 问答题

【说明】
某音像制品出租商店欲开发一个音像管理信息系统,管理音像制品的租借业务。需求如下:
1.系统中的客户信息文件保存了该商店的所有客户的用户名、密码等信息。对于首次来租借的客户,系统会为其生成用户名和初始密码。
2.系统中音像制品信息文件记录了商店中所有音像制品的详细信息及其库存数量。
3.根据客户所租借的音像制品的品种,会按天收取相应的费用。音像制品的最长租借周期为1周,每位客户每次最多只能租借6件音像制品。
4.客户租借某种音像制品的具体流程如下。
(1)根据客户提供的用户名和密码,验证客户身份。
(2)若该客户是合法客户,查询音像制品信息文件,查看商店中是否还有这种音像制品。
(3)若还有该音像制品,且客户所要租借的音像制品数小于等于6个,就可以将该音像制品租借给客户。这时,系统给出相应的租借确认信息,生成一条新的租借记录并将其保存在租借记录文件中。
(4)系统计算租借费用,将费用信息保存在租借记录文件中并告知客户。
(5)客户付清租借费用之后,系统接收客户付款信息,将音像制品租借给该客户。
5.当库存中某音像制品数量不能满足客户的租借请求数量时,系统可以接受客户网上预约租借某种音像制品。系统接收到预约请求后,检查库存信息,验证用户身份,创建相应的预约记录,生成预约流水号给该客户,并将信息保存在预约记录文件中。
6.客户归还到期的音像制品,系统修改租借记录文件,并查询预约记录文件和客户信息文件,判定是否有客户预约了这些音像制品。若有,则生成预约提示信息,通知系统履行预约服务,系统查询客户信息文件和预约记录文件,通知相关客户前来租借音像制品。


【问题4】
在进行系统分析与设计时,面向数据结构的设计方法(如Jackson方法)也被广泛应用。简要说明面向数据结构设计方法的基本思想及其适用场合。

答案

参考答案:面向数据结构的设计方法以数据结构作为设计的基础,它根据输入/输出数据结构导出程序的结构。
面向数据结构的设计方法用于规模不大的数据处理系统。

解析:
本题考查数据流图的设计和应用。
根据题目说明,本系统的外部实体仅仅涉及到客户,因此系统的顶层数据流图中E1应该对应为客户。
题目的第二个问题在于识别系统中的数据文件D1~D4,根据0层数据流图中的数据文件与处理之间的关系分析可以得知:
D1为创建新客户加工的输出,并且为加工1、6和7的输入,再根据题目中的描述,客户信息文件与创建客户信息、预约、归还和履行预约都相关,因此D1便是客户信息文件。同理可分析出D2为音像制品信息文件、D3为租借记录文件、D4为预约记录文件。
图(b)中缺少了3条数据流,我们先检查顶层数据流图和。层数据流是否一致。首先,从顶层数据流图中可以看出,与E1直接相关的数据流共有9条,而在0层数据流图中与E1直接关联的只有7条,因此可以直接断定,图(b)中至少缺少直接与E1相关的两条数据流:新客户创建请求和预约流水号。新客户创建请求通过创建新客户加工将客户的信息写入客户信息文件中,因此其起点和终点分别为:E1和4。同理,预约流水号的起点和终点为5和E1。在说明中,客户归还到期的音像制品,系统修改租借记录文件,并查询预约记录文件和客户信息文件,判定是否有客户预约了这些音像制品。若有,则生成预约提示信息,通知系统履行预约服务,系统查询客户信息文件和预约记录文件,通知相关客户前来租借音像制品。因此,在客户归还和履行预约服务之间存在着数据上的联系。
面向数据结构的设计方法以数据结构作为设计的基础,它根据输入/输出数据结构导出程序的结构。面向数据结构的设计方法用于规模不大的数据处理系统。

阅读理解

What could be cuter than your puppy giving his doggy friend a kiss on the nose? Nothing,really.But is your dog actually planting a kiss on his friend? Yes,but that’s only one of the reasons your dog may lick another dog’s nose.Here are some other reasons why your dog may lick another dog’s nose.  

During an introduction,a shy and lower-ranking dog will lower his head,avoid direct eye contact and gently extend his tongue to lick the nose of a more confident and high-ranking dog.The first dog licks the nose of the second dog to simply make it know that:he comes in peace.   

Dogs who are already friends will also trade kisses.Two strongly bonded dog pals will lick and clean each other.They give each other “dog kisses” showing friendship.

Puppies also “kiss” their mothers,but it's not a gesture of love.When puppies stop suckling(吸吮)their mothers’ tits for milk and start to eat semisolid(半固体)food instead;they lick their mothers’ mouths and noses in the hope of getting the mother to regurgitate(反哺) some semi-digested food.

So how to help your bashful dog make friends with other dogs? You can carefully select confident-but-friendly and good-tempered dogs to play with your shy dog,to help him develop his social skills.Also consider taking him to a special training class that focuses on socialization and positive training technique.

Do not disturb them when your two dogs play “kiss” briefly with each other.Sit back and enjoy this display of friendship.Then call them over and have them do a command such as “sit’’ or “shake paws”.Offer them treats as a reward for being good to each other.

If you foster(收养)a dog and have three or more resident dogs,introduce the foster dog to your brood dog one at a time and let muzzle licking between them happen naturally.Start with your least reactive or most friendly dog.Never force an in production between the dogs because this can deepen the foster dog’s submissiveness or spark a fight.

小题1:We know a shy and lower—ranking dog licks the nose of a higher-ranking dog to        

A.ask the dog for help

B.show he is friendly

C.show his anger

D.show his respect for him小题2:What can we know about two dogs who are already friends?

A.They seldom give each other kisses.

B.They usually avoid direct eye contact.

C.They like keeping their friendship a secret.

D.They show their friendship by “dog kisses”.小题3:What does the underlined word “bashful” in Paragraphs 5 mean?

A.Shy.

B.Honest.

C.Lovely.

D.Little.小题4:What should you do if your two dogs play “kiss” briefly with each other?

A.Ask them to stay away from each other immediately.

B.Ask them to shake tails.

C.Ask them to have a fight.

D.Give them a reward for being friends.小题5:The writer wrote this passage to_________.

A.tell us about a study he did recently

B.explain why a dog kisses other dogs

C.tell us how to raise dogs

D.help us to make friends with dogs.

选择题