Student_Answers_Chapter_04.doc

上传人:11****ws 文档编号:2993962 上传时间:2019-05-16 格式:DOC 页数:8 大小:70KB
下载 相关 举报
Student_Answers_Chapter_04.doc_第1页
第1页 / 共8页
Student_Answers_Chapter_04.doc_第2页
第2页 / 共8页
Student_Answers_Chapter_04.doc_第3页
第3页 / 共8页
Student_Answers_Chapter_04.doc_第4页
第4页 / 共8页
Student_Answers_Chapter_04.doc_第5页
第5页 / 共8页
点击查看更多>>
资源描述

1、Suggested answer for Exercise 4.1In this situation, the manager is not drawing the distinction between the users of a system and the roles they can play when using the system, represented by actors. The existence of an actor in a use case model does not imply that there is a particular individual re

2、stricted to that role. Any of the restaurants staff who are able to record reservations will be able to do so by adopting for the purpose the Receptionist role, or acting as a Receptionist. In practice, this might mean no more than logging on to the system using a particular user id.Suggested answer

3、 for Exercise 4.2The redrawn use case diagram is shown below. When the Staff actor is removed, the association with the Display Bookings use case must be shown explicitly for both the Receptionist and Head Waiter actors. The actors have been shown twice to simplify the drawing of the associations; t

4、his has no effect on the meaning of the diagram. This diagram is not quite equivalent to Figure 4.7. Both diagrams specify the same capabilities for the Receptionist and Head Waiter actors, but in addition Figure 4.7 defines an actor Staff who only has the ability to display bookings. No such actor

5、is defined in the diagram above, though a Staff actor could easily be added if required. Because this is a simple diagram, there is not much difference in complexity between the two versions. In more complicated diagrams, however, the use of actor generalization can significantly reduce the number o

6、f associations that have to be shown, thus simplifying the diagram. The use of “superactors“ also makes it easier to see when use cases can be performed by a variety of actors. Suggested answer for Exercise 4.3The following scenario describes a possible approach to this situation. Record booking - d

7、ouble booked table: exceptional course of events 1. The receptionist performs the Display Bookings use case for the date requested by the customer. 2. There is a suitable table available: the receptionist enters the customers name and phone number, the time of the reservation, the number of covers a

8、nd the table number. 3. The data entered overlaps with another booking made for the same table; the system issues a message informing the receptionist of this. 4. The receptionist acknowledges the message, and the use case terminates with no reservation being made. I have classified this as an excep

9、tional course of events because it arises from a mistake made by the user that results in a divergence from the basic course of events.Suggested answer for Exercise 4.4The answer to this question depends in part on how the record arrival operation is made available to users. If, for example, a pop-u

10、p menu presents the operations available on the selected booking, the record arrival option could be disabled in the case where arrival has already been recorded for the selected booking. If this approach was adopted, no alternative or exceptional course of events would be required, as the system wo

11、uld automatically prevent the situation arising. Alternatively, the system could detect this situation and warn the user appropriately, as described below. Record arrival - arrival already recorded: exceptional course of events 1. The head waiter performs the Display Bookings use case for the date r

12、equested by the customer. 2. The head waiter confirms arrival for a selected booking. 3. The booking is already recorded as arrived, so the system displays a warning message without altering the booking. 4. The head waiter confirms that no action is to be taken. Suggested answer for Exercise 4.5The

13、most obvious exceptional case is if the user enters a date that is in some way invalid. Display bookings - invalid date: exceptional course of events 1. The user enters a date. 2. The date was invalid in some way, perhaps wrongly formatted or something like 31 February, 2004. The system reports the

14、error to the user and prompts for the date to be reentered. The case where there are no bookings to be displayed for the date selected is not really an alternative course of events, as it is implicitly included in the basic course: if there are no bookings, the system simply has nothing to display f

15、or that date.Suggested answer for Exercise 4.6Various alternative and exceptional courses of events for these use cases are listed and briefly described below. Cancel bookings - invalid date: exceptional course of events 1. The receptionist performs the Display Bookings use case for the date given b

16、y the customer. 2. The receptionist selects and cancels the relevant reservation. 3. The date of the booking is prior to the current date: the system displays a suitable error message and the booking is not cancelled. Cancel bookings - booking arrived: exceptional course of events 1. The receptionis

17、t performs the Display Bookings use case for the date given by the customer. 2. The receptionist selects and cancels the relevant reservation. 3. The booking is already recorded as having arrived: the system displays a suitable error message and the booking is not cancelled. Table transfer - table t

18、oo small: exceptional course of events 1. The head waiter performs the Display Bookings use case for the current date. 2. The head waiter selects the required booking. 3. The head waiter changes the table allocation of the booking. 4. The number of covers recorded for the booking is larger than the

19、maximum specified size of the new table, so the system issues a warning message asking the head waiter if the transfer should go ahead. 5. If the answer is no, the booking is not modified. 6. If the answer is yes, the system records the alteration and updates the display. Table transfer - invalid da

20、te: exceptional course of events 1. The head waiter performs the Display Bookings use case for the current date. 2. The head waiter selects the required booking. 3. The head waiter changes the table allocation of the booking. 4. The date of the booking is prior to the current date: the system displa

21、ys a suitable error message and the booking is not modified. Table transfer - double booked table: exceptional course of events 1. The head waiter performs the Display Bookings use case for the current date. 2. The head waiter selects the required booking. 3. The head waiter changes the table allocation of the booking. 4. The head waiter has attempted to transfer the booking to a table that is already occupied: the system displays a suitable error message and the booking is not modified.

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 实用文档资料库 > 策划方案

Copyright © 2018-2021 Wenke99.com All rights reserved

工信部备案号浙ICP备20026746号-2  

公安局备案号:浙公网安备33038302330469号

本站为C2C交文档易平台,即用户上传的文档直接卖给下载用户,本站只是网络服务中间平台,所有原创文档下载所得归上传人所有,若您发现上传作品侵犯了您的权利,请立刻联系网站客服并提供证据,平台将在3个工作日内予以改正。