6ed Solutions Chap05
-
Upload
arora-rameshwar -
Category
Documents
-
view
318 -
download
3
Transcript of 6ed Solutions Chap05
-
8/10/2019 6ed Solutions Chap05
1/38
Systems Analysis and Design in a Changing World, sixth edition 5-1
Chapter 5 Extending the Requirements Models
Solutions to End-of-Chapter Problems
Review Questions
1. What are the models that describe use cases in more detail?
Fully developed use case description, activity diagrams, and system sequence diagrams.
2. What two U! dia"rams are used to model domain classes?
Prolem domain class diagram and state machine diagram.
#. Which part of a use case description can also be modeled b$ usin" an acti%it$ dia"ram?
!he "#lo$ o# activities% section.
&. E'plain the difference between a use case and a scenario. (i%e a specific e'ample of a use case
with a few possible scenarios.
& use case is the entire #unction or user goal or event. & scenario is one speci#ic version or
instance o# that use case.
From RM' $e have Create customer accountas a use case. (ut $e might have Create online
Customer accountand Create instore customer accountand even Create phone customeraccountas di##erent scenarios.
5. !ist the parts or compartments of a full$ de%eloped use case description.
)se case name *cenario
!riggering event
(rie# description
&ctors
Related use cases
*ta+eholders
Preconditions
Postconditions
Flo$ o# activities
Exception conditions
). Compare*contrast precondition and postcondition.
& precondition descries the "states% o# data and the system that must exist e#ore the use case
can egin. For example to add an item to a shopping cart, the item must exist in the dataase.
& postcondition descries the states o# data and the system that must exist a#ter the use casecompletes. For example a#ter Create a customer accountuse case, a customer account oect
-record must exist.
-
8/10/2019 6ed Solutions Chap05
2/38
Systems Analysis and Design in a Changing World, sixth edition 5-2
+. Compare*contrast postcondition and e'ception condition.
& post condition, as explained aout descries states o# the data and the system. &n exception
condition descries some non/normal situation in the processing, i.e. in the #lo$ o# activities,
that must e handled in some $ay..
,. Compare*contrast business process and flow of acti%ities for a use case. E'plain how an
acti%it$ dia"ram can be used to model both.
& usiness process is larger than a use case. & usiness process might include various manual
usiness procedures oth e#ore and a#ter the "usiness event% that causes the use case to occur.
0o$ever, an activity diagram is a po$er#ul model to descrie all types o# sequences o# tas+sand activities. !he various s$imlanes can represent various users or user groups as $ell as
system activities.
. What is the purpose of an SS? What s$mbols are used in an SS?
&n **1 -system sequence diagram is used to descrie the messages that #lo$ into and out o# asystem, i.e. et$een the system and the use case user. !he symols include2
*tic+ #igure #or the actor
(ox $ith oect name #or the system oect
3ertical dashed lines #or oect li#elines
0ori4ontal arro$s #or messages
0ori4ontal dashed arro$s #or return data
Comment ox #or comments
1/. What are the steps re0uired to de%elop an SS?
. 6denti#y the input messages -#rom the activity diagram
7. 1escrie the input message using the **1 message syntax
8. &dd message conditions such as looping or true9#alse conditions
:. &dd all output message data
11. Write a complete SS messa"e from the actor to the s$stem with the actor asin" the s$stem
to be"in the process for updatin" information about a specific product.
updateProduct6n#ormation -product61, update6n#ormation
12. What is the name of the se0uence dia"ram s$mbol used to represent the e'tension of an ob3ect
throu"hout the duration of a use case?
;i#eline or oect li#eline
1#. What are the two wa$s to show a returned %alue on a se0uence dia"ram?
Either $ith a return value on the le#t hand side o# the equal -2
-
8/10/2019 6ed Solutions Chap05
3/38
Systems Analysis and Design in a Changing World, sixth edition 5-#
sho$n y a dashed line and laeled $ith the return data.
1&. What are two wa$s to show repetition on a se0uence dia"ram?
Either $ith an asteris+ on the message lael or a loop #rame around the message-s.
15. What are the three t$pes of frames used on a se0uence dia"ram?
;oop #ramerepeat or loop the contents o# the #rame
'pt #ramesend or do not send the message ased on true9#alse condition< #ramei#/else alternative #lo$s ased on condition
1). What is the s$mbol for a true*false condition on a se0uence dia"ram?
& true9#alse condition is sho$n in rac+ets = >
1+. What are the parameters of a messa"e?
!he parameters represent the input data, i.e. the data that is eing passed to the destination
oect.
1,. !ist the primar$ steps for de%elopin" a SS.
'oops, duplicate question. *ee question ?.
1. What is an ob3ect state?
&n oect state is the state o# eing o# an oect, and is usually measured y a set o# values. 6t is
comparale to a status condition.
2/. What is a state transition?
& state transition is the movement o# an oect #rom one state to another state.
21. When considerin" re0uirements states and state transitions are important for understandin"
which other dia"ram?
*tates and !ransitions are part o# the state machine diagram #or an oect class. !here#ore, they
help to understand the oects in the class diagram.
22. What U! dia"ram is used to show the states and transitions for an ob3ect?
*tates and !ransitions are part o# the state machine diagram, $hich descries the activity o# theoects in an oect class.
2#. !ist the elements that mae up a transition description. Which elements are optional?
-
8/10/2019 6ed Solutions Chap05
4/38
Systems Analysis and Design in a Changing World, sixth edition 5-&
Transition-name (parameters, ... ) [guard-condition] / action-expression
&ny o# the three elements may e empty, i.e. are optional.
2&. What is a composite state? What is it used for?
& composite state is a high/level state in that it may have other states and transitions inside o# it.6t is used to represent concurrent states. For example, a printer may e in the "on% state, $hich
is a composite state, and it may e "idle% $hich is an internal state $ithin "on.%
25. What is meant b$ the termpath?
& path is a sequence o# states and transitions. 6t may e a complete path to descrie an entire
origin to destination path, or it may e a "snippet% o# a path and only contain a #e$ states andtransitions.
2). What is the purpose of a "uard-condition?
& guard/condition determines $hether or not a transition can #ire. )sually #irst the trigger #ires
to noti#y the transition that it should execute, ut e#ore it egins execution, it tests to see i# theguard/condition is true.
2+. 4dentif$ the models e'plained in this chapter and their relationship to one another.
!he t$o main models #or requirements are the )se case model,$hich identi#ies the use cases or
the "processes,% and the 1omain model class diagram, $hich identi#ies the in#ormation or data
#or the system.
!he )se case diagram is supported y )se Case 1escriptions, &ctivity diagrams, and *ystem
*equence diagrams. !he 1omain model class diagram is supported y *tate machine diagrams.
-
8/10/2019 6ed Solutions Chap05
5/38
Systems Analysis and Design in a Changing World, sixth edition 5-5
Problems and Exerises
1. fter readin" the followin" narrati%e do the followin"6
i. e%elop an acti%it$ dia"ram for each scenario.
ii. Complete a full$ de%eloped use case description for each scenario.
Contractor Sale acti%it$ dia"ram6
-
8/10/2019 6ed Solutions Chap05
6/38
Systems Analysis and Design in a Changing World, sixth edition 5-)
Contractor Sale full$ de%eloped use case description6
)se Case @ame2 Create a ne$ sale*cenario2 Create ne$ sale to a contractor -on account sale
!riggering Event2 Contractor $ants to purchase items.
(rie# 1escription2 & contractor $ants to purchase items. !he cler+ rings up the items and then
adds them to the contractorAs account.
&ctors2 *ales cler+
*ta+eholders2 *ales cler+
&ccounting department*ales department
Preconditions2 Customer account must exist.6nventory items must exist.
Postconditions2 @e$ sale is created.*ales line items are created and connected to the sale.
Customer-contractor account is updated.
Flo$ o# &ctivities2 &ctor *ystem
. Cler+ enters contractor 61.
7. Cler+ enters each item.
8. Cler+ indicates the end o# the sale.
:. 6# contractor $ants receipt, requests
receipt.
. *ystem validates contractor
account.7. *ystem #inds item in
inventory, #inds price, adds to
total.8. *ystem calculates total and
adds to contractor account.
:. *ystem prints receipt.
ExceptionConditions2
. 6# contractor account is out o# alance, treat this sale as a cash sale, orstop process and send contractor to accounting cler+.
7. 6# system has in#ormation missing, sales cler+ calls manager and
manually enters in#ormation.
8. 6# contractor account alance is over the limit, treat as cash sale, cancel,or send contractor to accounting cler+.
-
8/10/2019 6ed Solutions Chap05
7/38
Systems Analysis and Design in a Changing World, sixth edition 5-+
Sale to public acti%it$ dia"ram6
-
8/10/2019 6ed Solutions Chap05
8/38
Systems Analysis and Design in a Changing World, sixth edition 5-,
Sale to public full$ de%eloped use case description6
)se Case @ame2 Create a ne$ sale
*cenario2 & ne$ cash sale!riggering Event2 Cash customer $ants to purchase items.
(rie# 1escription2 & cash customer $ants to purchase items. !he cler+ enters the item 61, andthe system creates a sales tic+et. Customer pays $ith cash, chec+ or credit
card.
&ctors2 *ales cler+
*ta+eholders2 *ales cler+
&ccounting department*ales department
Preconditions2 6nventory items must exist.
Postconditions2 @e$ sale is created.
*ales line items are created and connected to the sale.Payment transaction is created.
Flo$ o# &ctivities2 &ctor *ystem
. Cler+ starts ne$ cash sale.
7. Cler+ enters each item.
8. Cler+ indicates the end o# the sale.
:. Cler+ indicates type o# payment and
enters in#ormation.
7. *ystem #inds item ininventory, #inds price, displays
in#ormation, adds to total.
8. *ystem calculates total.
:. *ystem processes payment and
creates payment transaction.
ExceptionConditions2
7. 6# system has in#ormation missing, sales cler+ calls manager andmanually enters in#ormation.
:. 6# customer credit card #ails approval, require cash or cancel sale.
-
8/10/2019 6ed Solutions Chap05
9/38
Systems Analysis and Design in a Changing World, sixth edition 5-
2. 7ased on the followin" narrati%e de%elop either an acti%it$ dia"ram or a full$ de%eloped
description for the use case ofAdd a new vehile to an existing poliyin a car insurance s$stem.
Customer Clerk System
H
Provide Policy #
Enter Policy #
Find policy/display details
Verify status
Provide car details
Enter car informationValidate car information
against standards
Include coverage type/select amount
for each coverage type
Enter coverageinformation
Validate against standards/add to policy
end for each
Validate comination
coverages!e" driver
for each additional driver
Provide name and percent
Enter name and percent
$dd driver to car
end for each
%pdate policy/calculater premium/
print statement
Invoke $dd ne"driver use case
yes
H
-
8/10/2019 6ed Solutions Chap05
10/38
Systems Analysis and Design in a Changing World, sixth edition 5-1/
)se Case @ame2 &dd a ne$ vehicle to an existing policy
*cenario2 !elephone instance $ith customer and cler+
!riggering Event2 Customer uys a ne$ vehicle.(rie# 1escription2 Customer provides car in#ormation, requests coverage $ith amounts,
identi#ies drivers o# the ne$ car. *ystem updates the policy.
&ctors2 Customer service cler+
*ta+eholders2 Customer Customer service department
Preconditions2 Customer policy must exist and e up to date.*tandard3ehicle control tales #or this vehicle type and year must exist.
*tandardCoverage tales exist.
Postconditions2 @e$ vehicle oect created and connected to policy.&lso connected to *tandard3ehicle.
@e$ coverage oects created and connected to vehicle.&lso connected to *tandardCoverage.@e$ driver -6nsuredPerson -i# necessary created and added to policy.
Existing drivers and percentages updated.
Policy updated $ith ne$ premiums.
Flo$ o# &ctivities2 &ctor *ystem
. Cler+ enters customer in#ormation.
7. Cler+ veri#ies policy is current.
8. Cler+ enters car identi#ication
in#ormation.:. Cler+ enters each type o# coverage
customer requests, includingdeductiles and coverage amount.5. Cler+ indicates all coverages have
een entered.
B. Cler+ invo+esAdd new personusecase i# necessary.
. Cler+ changes driver percentages on
this car and other cars.D. Cler+ indicates everything is
complete.
. *ystem #inds policy and
displays details.
8. *ystem validates that car has
+no$n standard.:. *ystem validates coverage
requests.
5. *ystem does comination
validation on policy.
. *ystem updates driver
in#ormation.D. *ystem updates policy,
calculates ne$ premium, prints
ne$ statement.
ExceptionConditions2
7. 6# policy is not current, cler+ requests payment or collects necessaryin#ormation.
8. 6# car type is not in system, cler+ re#ers customer to under$riting tohandle this situation.
:. 6# coverage requests are out o# range, cler+ as+s customer #or changed
amount.5. 6# some comination is invalid, return to step :.
-
8/10/2019 6ed Solutions Chap05
11/38
Systems Analysis and Design in a Changing World, sixth edition 5-11
#. (i%en the followin" list of classes and associations for the pre%ious car insurance s$stem list
the preconditions and postconditions for the use caseAdd a new vehileto an e'istin" polic$.
Preconditions2 Customer policy must exist and e up to date.
*tandard3ehicle control tales #or this vehicle type and year must exist.*tandardCoverage tales exist.
Postconditions2 @e$ vehicle oect created and connected to policy.
&lso connected to *tandard3ehicle.@e$ coverage oects created and connected to vehicle.
&lso connected to *tandardCoverage.
@e$ driver -6nsuredPerson -i# necessary created and added to policy.Existing drivers and percentages updated.
Policy updated $ith ne$ premiums.
-
8/10/2019 6ed Solutions Chap05
12/38
Systems Analysis and Design in a Changing World, sixth edition 5-12
&. e%elop an SS based on the narrati%e and $our acti%it$ dia"ram for problem 1.
Contractor Sale6
-
8/10/2019 6ed Solutions Chap05
13/38
Systems Analysis and Design in a Changing World, sixth edition 5-1#
Public sale6
5. e%elop a n SS based on the narrati%e or $our acti%it$ dia"ram for problem 2.
-
8/10/2019 6ed Solutions Chap05
14/38
Systems Analysis and Design in a Changing World, sixth edition 5-1&
-
8/10/2019 6ed Solutions Chap05
15/38
Systems Analysis and Design in a Changing World, sixth edition 5-15
). 8e%iew the cellular telephone state machine dia"ram shown in 9i"ure 5-21 and then answer
the followin" 0uestions. :;ote that this telephone has characteristics not found in ordinar$
telephones. 7ase $our answers onl$ on the state machine dia"ram.