Systems Analysis and Design in a Changing World, World, sixth edition
5-1 5-1
Chapter 5 – Extending the Requirements Models Solutions to End-of-Chapter Problems 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 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 scenario is one speci#ic version or instance o# that use case. From RM' $e have Create customer account as as a use case. (ut $e might have Create online Customer account and and Create instore instore customer account accou nt and and even Create phone customer account as as 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 c ase can egin. For example to add an item to a shopping cart, the item must exist in the dataase. & postcondition postcondition descries the states o# data and the system that must exist a#ter the use case completes. For example a#ter Create a customer account use use case, a customer account oect -record must exist.
Systems Analysis and Design in a Changing World, World, sixth edition
5-2 5-2
+. Compare*contrast postcondition and e'ception condition.
& post 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 an acti%it$ dia"ram can be used to model both.
& usiness usiness process is larger than 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+s and 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# a system, 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 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< sign, or $ith a return message
Systems Analysis and Design in a Changing World, World, sixth edition
5-2 5-2
+. Compare*contrast postcondition and e'ception condition.
& post 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 an acti%it$ dia"ram can be used to model both.
& usiness usiness process is larger than 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+s and 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# a system, 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 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< sign, or $ith a return message
Systems Analysis and Design in a Changing World, World, sixth edition
5-# 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 #rame – #rame – repeat repeat or loop the con tents o# the #rame 'pt #rame – #rame – send send or do not send the message ased on true9#alse condition < #rame – #rame – i#/else i#/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 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 !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# the oects in an oect class. 2#. !ist the elements that mae up a transition description. Which elements are optional?
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 term path?
& 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 and transitions. 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# the guard/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 c ase 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.
Systems Analysis and Design in a Changing World, sixth edition
Problems and Exerises 1. fter readin" the followin" narrati%e do the followin"6 i. ii.
e%elop an acti%it$ dia"ram for each scenario. Complete a full$ de%eloped use case description for each scenario.
Contractor Sale acti%it$ dia"ram6
5-5
Systems Analysis and Design in a Changing World, sixth edition
Contractor Sale full$ de%eloped use case description6
)se Case @ame2 *cenario2 !riggering Event2 (rie# 1escription2 &ctors2 *ta+eholders2
Preconditions2 Postconditions2
Flo$ o# &ctivities2
Exception Conditions2
Create a ne$ sale Create ne$ sale to a contractor -on account sale Contractor $ants to purchase items. & contractor $ants to purchase items. !he cler+ rings up the items and then adds them to the contractorAs account. *ales cler+ *ales cler+ &ccounting department *ales department Customer account must exist. 6nventory items must exist. @e$ sale is created. *ales line items are created and connected to the sale. Customer -contractor account is updated. &ctor *ystem . Cler+ enters contractor 61. . *ystem validates contractor account. 7. Cler+ enters each item. 7. *ystem #inds item in inventory, #inds price, adds to 8. Cler+ indicates the end o# the sale. total. 8. *ystem calculates total and :. 6# contractor $ants receipt, requests adds to contractor account. receipt. :. *ystem prints receipt. . 6# contractor account is out o# alance, treat this sale as a cash sale, or stop 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+.
5-)
Systems Analysis and Design in a Changing World, sixth edition
Sale to public acti%it$ dia"ram6
5-+
Systems Analysis and Design in a Changing World, sixth edition
5-,
Sale to public full$ de%eloped use case description6
)se Case @ame2 *cenario2 !riggering Event2 (rie# 1escription2
&ctors2 *ta+eholders2
Preconditions2 Postconditions2
Flo$ o# &ctivities2
Create a ne$ sale & ne$ cash sale Cash customer $ants to purchase items. & cash customer $ants to purchase items. !he cler+ enters the item 61, and the system creates a sales tic+et. Customer pays $ith cash, chec+ or credit card. *ales cler+ *ales cler+ &ccounting department *ales department 6nventory items must exist. @e$ sale is created. *ales line items are created and connected to the sale. Payment transaction is created. &ctor *ystem . Cler+ starts ne$ cash sale. 7. Cler+ enters each item.
Exception Conditions2
8. Cler+ indicates the end o# the sale.
7. *ystem #inds item in inventory, #inds price, displays in#ormation, adds to total. 8. *ystem calculates total.
:. Cler+ indicates type o# payment and enters in#ormation.
:. *ystem processes payment and creates payment transaction.
7. 6# system has in#ormation missing, sales cler+ calls manager and manually enters in#ormation. :. 6# customer credit card #ails approval, require cash or cancel sale.
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 of Add a new vehile to an existing poliy in a car insurance s$stem.
Customer
Clerk
System
H
Provide Policy # Enter Policy # Find policy/ display details Verify status Provide car details
Enter car informaon Validate car informaon against standards
for eac coverage type
Include coverage type/ select amount
Enter coverage informaon Validate against standards/ add to policy end for eac
Validate com!inaon coverages "e driver$
yes
Invoke %dd ne driver use case for eac addional driver
Provide name and percent Enter name and percent %dd driver to car end for eac
H
&pdate policy/ calculater premium/ print statement
Systems Analysis and Design in a Changing World, sixth edition
)se Case @ame2 *cenario2 !riggering Event2 (rie# 1escription2 &ctors2 *ta+eholders2 Preconditions2
Postconditions2
Flo$ o# &ctivities2
Exception Conditions2
&dd a ne$ vehicle to an existing policy !elephone instance $ith customer and cler+ Customer uys a ne$ vehicle. Customer provides car in#ormation, requests coverage $ith amounts, identi#ies drivers o# the ne$ car. *ystem updates the policy. Customer service cler+ Customer Customer service department Customer policy must exist and e up to date. *tandard3ehicle control tales #or this vehicle type and year must exist. *tandardCoverage tales exist. @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. &ctor *ystem . Cler+ enters customer in#ormation. . *ystem #inds policy and 7. Cler+ veri#ies policy is current. displays details. 8. Cler+ enters car identi#ication 8. *ystem validates that car has in#ormation. +no$n standard. :. Cler+ enters each type o# coverage :. *ystem validates coverage customer requests, including requests. deductiles and coverage amount. 5. Cler+ indicates all coverages have 5. *ystem does comination een entered. validation on policy. B. Cler+ invo+es Add new person use case i# necessary. . Cler+ changes driver percentages on . *ystem updates driver this car and other cars. in#ormation. D. Cler+ indicates everything is D. *ystem updates policy, complete. calculates ne$ premium, prints ne$ statement. 7. 6# policy is not current, cler+ requests pay ment or collects necessary in#ormation. 8. 6# car type is not in system, cler+ re#ers customer to under$riting to handle 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 :.
5-1/
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 case Add a new vehile to an e'istin" polic$.
Preconditions2
Postconditions2
Customer policy must exist and e up to date. *tandard3ehicle control tales #or this vehicle type and year must exist. *tandardCoverage tales exist. @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.
Systems Analysis and Design in a Changing World, sixth edition
&. e%elop an SS based on the narrati%e and $our acti%it$ dia"ram for problem 1.
Contractor Sale6
5-12
Systems Analysis and Design in a Changing World, sixth edition
Public sale6
5. e%elop a n SS based on the narrati%e or $our acti%it$ dia"ram for problem 2.
5-1#
Systems Analysis and Design in a Changing World, sixth edition
5-1&
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.< i. What happens to turn on the telephone?
& person has to s$itch it on $ith some external event. ii. What states does the telephone "o into when it is turned on?
6t goes into the composite state -unlaeled, ut should have a lael o# '@. 6t goes into the Quiet state #or one path. 6t can also go into Charged , ow !arning , or "ischarged . iii. What are the three wa$s the telephone can be turned off?
#witch$%% , Quiet and ow !arning , or "ischarged . i%. Can the telephone turn off in the middle of the cti%e :=alin"< state?
es, i# it is discharged, it leaves the "ischarged nested state and the $n composite state. %. >ow can the telephone "et to the cti%e :=alin"< state?
!hrough the origin state o# connecting or y ans$ering #rom the origin state o# ringing. %i. Can the telephone be plu""ed in while someone is talin"?
@o. !he state chart says it can only e plugged in #rom the Quiet state. %ii. Can the telephone chan"e batter$ states while someone is talin"? E'plain which mo%ement is allowed and which isnt allowed.
6t can go #rom Charged to ow !arning and #rom ow !arning to "ischarged . 0o$ever, ecause it cannot e plugged in $hile someone is tal+ing, it cannot move ac+ up #rom "ischarged to ow !arning or Charged . %iii. What states are concurrent with what other states? ae a two-column table showin" the concurrent states.
Concurrent *tates uiet, 1ialing, Connecting, Ringing, &ctive, and Plugged 6n
Charged, ;o$ Garning, 1ischarged
Systems Analysis and Design in a Changing World, sixth edition
5-1)
+. 7ased on the followin" description of a shipment made b$ Union Parcel Shipments identif$ all the states and e'it transitions and then de%elop a state machine dia"ram.
,. !ocate a compan$ in $our area that de%elops software. Consultin" companies or companies with a lar"e staff of information s$stems professionals tend to be more ri"orous in their approach to s$stems de%elopment. Set up an inter%iew. etermine the de%elopment approaches that the compan$ uses. an$ companies still use traditional structured techni0ues combined with some ob3ect-oriented de%elopment. 4n other companies some pro3ects are structured whereas other pro3ects are ob3ect oriented. 9ind out what inds of modelin" the compan$ does for re0uirements specification. Compare $our findin"s with the techni0ues tau"ht in this chapter.
&ns$ers $ill vary.
Systems Analysis and Design in a Changing World, sixth edition
5-1+
Solutions to End-of-Chapter Cases Case Study! "heEyes#ave$t%om &oo' Exhange 9or this case de%elop these dia"rams6 1. domain model class dia"ram 2. list of uses cases and a use case dia"ram #. full$ de%eloped description for two use cases6 Add a seller and Reord a boo' order &. n SS for each of the two use cases in 0uestion # 1. domain model class dia"ram
Systems Analysis and Design in a Changing World, sixth edition
2. list of uses cases and a use case dia"ram
Register
List a book Seller
otify shipment made
Search for book
otify seller about purchase "##includes$$
Open account "##includes$$ Send check to seller Buyer
EyesHaveIt Employee !urchase a book
Enter problem with purchase Enter satisfaction code
5-1,
Systems Analysis and Design in a Changing World, sixth edition
5-1
#. full$ de%eloped description for two use cases6 Add a seller and Reord a boo' order
Use Case ;ame6 Scenario6 =ri""erin" E%ent6 7rief escription6 ctors6 Staeholders6 Preconditions6 Postconditions6 9low of cti%ities6
Register Register9add a ne$ seller & ne$ seller $ants to sell oo+s. *eller decides he9she $ould li+e to list a oo+-s. *eller registers and receives a con#irmation e/mail. *eller E/mail server *eller must not exist in the system. *eller must have all in#ormation necessary to register. *eller has an account to list oo+s. &ctor *ystem . *eller connects to Eyes0ave6t.com and #ills out registration #orm. 7. *eller sumits registration #orm.
E'ception Conditions6
7. *ystem noti#ies seller a con#irmation e/mail $ill e sent. 7.7 *ystem e/mails con#irmation o# registration to seller. . 6# the seller already exists in the system, the system sends prior login and pass$ord to e/mail address. 7. 6# the seller $as removed #rom the system #or ad transactions9credit, the system sends the seller an e/mail noti#ying the seller o# the situation and no account is created.
Use Case ;ame6 Scenario6 =ri""erin" E%ent6 7rief escription6
ctors6
Staeholders6
Purchase a oo+ Purchase a oo+ & uyer decides to purchase a oo+ #rom Eyes0ave6t.com. Customer searches #or a oo+-s on Eyes0ave6t.com. Customer selects #rom search results and adds a oo+-s to the shopping cart. Customer then proceeds to chec+out. 6# an account exists, the customer con#irms purchase, and the system sends a con#irmation e/mail to the customer. 6# an account doesnAt exist, an account is created, the purchase is con#irmed, and the con#irmation e/mail is sent. (uyer E/mail server *eller
Systems Analysis and Design in a Changing World, sixth edition
Preconditions6 Postconditions6
9low of cti%ities6
5-2/
(oo+s and oo+ in#ormation must exist in the system. Customer account must exist. 'rder must e placed. E/mail must e sent to seller. &ctor *ystem . (uyer searches Eyes0ave6t.com #or . *earches #or all matches a oo+-s. related to uyerAs search criteria. 7. (uyer selects a oo+-s to purchase #rom search results.
7. Creates shopping cart. &dds selected item-s to the shopping cart.
8. Repeat steps and 7 until all desired oo+s are added to shopping cart. :. Customer proceeds to chec+out y selecting the Chec+out utton.
:. 1isplays list o# shopping cart items #or veri#ication.
:a. 6# customer $ishes to remove an item, he9she selects the item to e removed and then selects the 1elete utton.
:a. 1isplays list o# shopping cart items $ith deleted items removed.
:. 6# uyer $ishes to add an item, he9she selects the Continue *hopping utton and proceeds to steps and 7. 5. (uyer veri#ies displayed in#ormation.
5. 1isplays uyer in#ormation.
B. 6# in#ormation is incorrect or uyer account does not exist, uyer updates displayed in#ormation or enters ne$ in#ormation into the registration #orm.
B. )pdates ne$ uyer in#ormation #or existing account. B.7 Creates account #or ne$ uyer and sends con#irmation.
. (uyer con#irms purchase. E'ception Conditions6
. Records order. .7 *ends e/mail to seller. . 6# oo+ is sold out, uyer cannot add oo+ to shopping cart. 7. 6# uyer account does not exist, a ne$ account must e created. 6# uyer is reected #or ne$ account ased on credit, system sends uyer noti#ication. 8. 6# payment is reected, system noti#ies uyer and seller.
Systems Analysis and Design in a Changing World, sixth edition
&. n SS for each of the two use cases in 0uestion #
5-21
Systems Analysis and Design in a Changing World, sixth edition
5-22
Running Cases! Community &oard o( Realtors =he ultiple !istin" Ser%ice s$stem has a number of use cases which $ou identified in Chapter # and three e$ domain classes which $ou identified in Chapter &6 8ealEstate@ffice "ent and !istin".
1. 9or the use case Add agent to real estate o((ie write a full$ de%eloped use case description and draw an SS. 8e%iew the case materials in pre%ious chapters and recall that the s$stem will need to now which real estate office the a"ent wors for before promptin" for a"ent information.
Use case name6
&dd agent to real estate o##ice
Scenario6
M;* cler+ adding agent
=ri""erin" e%ent6
@e$ agent hired in a real estate o##ice
7rief description6
!he correct real estate o##ice is identi#ied, and the ne$ real estate agent in#ormation is entered into the system.
ctors6
M;* cler+
8elated use cases6
Real estate o##ice adds ne$ agent -Ge ased version scenario
Staeholders6
Real estate o##ice, real estate agent
Preconditions6
!he real estate o##ice must exist
Postconditions6
Real estate agent is created and associated $ith real estate o##ice
9low of acti%ities
ctor
. Find correct real estate o##ice 7. Enter ne$ agent in#ormation
E'ception conditions6
S$stem
. 1isplay real estate o##ice in#ormation 7. Create ne$ agent record, including $ith relationship to real estate o##ice
. @o real estate o##ice #ound #or requested id9name. 1isplay not #ound message.
Systems Analysis and Design in a Changing World, sixth edition
5-2#
Systems Analysis and Design in a Changing World, sixth edition
5-2&
2. 9or the use case Create new listing write a full$ de%eloped use case description and draw an SS. 8ecall that the s$stem needs to now which a"ent made the listin" before the s$stem prompts for listin" information.
Use case name6
Create a ne$ listing
Scenario6
M;* cler+ creates a ne$ listing
=ri""erin" e%ent6
@e$ property is put up #or sale
7rief description6
!he listing agent is identi#ied and veri#ied. !he ne$ property in#ormation is entered into the system, along $ith images etc.
ctors6
M;* cler+
8elated use cases6
Real estate o##ice9agent creates a ne$ listing -Ge version scenario
Staeholders6
Real estate o##ice, Real estate agent, Property o$ner
Preconditions6
Real estate o##ice must exist Real estate agent must exist
Postconditions6
@e$ listing must e created and associated $ith RE o##ice and RE agent
9low of acti%ities
ctor
. Find real estate agent 7. Enter ne$ listing in#ormation
E'ception conditions6
S$stem
. 1isplay agent and o##ice in#ormation 7. Create ne$ property listing record, associated $ith agent. 1isplay results.
. &gent in#ormation not #ound. 1isplay not #ound message.
Systems Analysis and Design in a Changing World, sixth edition
5-25
#. raw a state machine dia"ram showin" the states and transitions for a !istin" ob3ect.
@ote2 &ns$ers $ill vary ecause students $ill have to rainstorm valid states #or a ;isting oect. 6n our solution $e $ill use the #ollo$ing states and exit transitions. -!he term "*ale% is used to mean either "*ale% or ";ease%
State
E'it transition
For sale
'##er to uy
*ale pending
Close the sale
*old Removed
Reinstate listing
Systems Analysis and Design in a Changing World, sixth edition
5-2)
Running Cases! "he Spring &rea's )R) *s "ravel Servie =he Sprin" 7reas A8 Us =ra%el Ser%ice s$stem has man$ use cases and domain classes which $ou identified in Chapters # and &. 8e%iew the domain model class dia"ram to "et a feel for the comple'it$ of some of the use cases. 1. 9or the use case &oo' a reservation, $rite a #ully developed use case description and dra$ an **1. Revie$ the classes that are associated $ith a reservation in the domain model to understand the #lo$ o# activities and repetition involved. Use case name6
(oo+ a reservation
Scenario6
(oo+ a reservation online
=ri""erin" e%ent6
*tudent $ants to ma+e a reservation and initiates oo+ing
7rief description6
*tudent searches or ro$ses the resorts. 0e9she chec+s accommodations and availaility. !hen he9she ma+es a reservation #or either a single person or a group. -&llo$ oth individual and group reservations.
ctors6
*tudent
8elated use cases6
Create individual account -includes !raveler Create group account &dd person to group -ne$ use case previously unde#ined
Staeholders6
*tudent, Resort
Preconditions6
!raveler and 6ndividual account must exist Hroup must exist -#or group reservation Resort must exist
Postconditions6
Reservation must e created and associated $ith Resort and Hroup9!raveler Payment must e created and associated $ith 6ndividual&ccount
9low of acti%ities
ctor
. Find a resort -search or ro$se 7. Chec+ availaility o# accommodations 8. Choose reservation type :. Enter reservation details 5. Enter reservation payment in#ormation
E'ception conditions6
5. Payment transaction #ails
S$stem
. 1isplay resort and accommodation in#ormation 7. 1isplay accommodation availaility in#ormation :. Ma+e reservation 5. 3eri#y individual6n#o and payment6n#o Create Payment!ransaction #or Reservation 1isplay con#irmation *end email con#irmation
Systems Analysis and Design in a Changing World, sixth edition
5-2+
@ote2 (ased on the requirements o# this use case, and the previously de#ined use cases, the partial domain model class diagram created in Chapter : needs to e enhanced $ith several more classes2 Hroup, Reservation, Payment!xn, Personal&ccount. !he class diagram #or Chapter : only #ocused on the social net$or+ing part. *ee the partial class diagram elo$.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Systems Analysis and Design in a Changing World, sixth edition
5-2,
2. 9or the use case Add new resort write a full$ de%eloped use case description and draw an SS. 8e%iew the classes that are associated with a resort in the domain model to understand the flow of acti%ities and repetition in%ol%ed.
Use case name6
&dd a ne$ resort
Scenario6
&dd a ne$ resort
=ri""erin" e%ent6
& ne$ resort contracts $ith *(R) to participate in the vacation program
7rief description6
& ne$ resort is added $ith descriptive in#ormation. 6n#ormation aout the accommodations availale to this program are entered. 6n#ormation aout the #acilities availale #or activities in this program are entered
ctors6
*(R) cler+, Resort employee
8elated use cases6 Staeholders6
*(R) management, Resort management
Preconditions6
Resort must not already exist
Postconditions6
Resort is created Facilities are created and associated $ith the resort &ccommodations are created #or this resort
9low of acti%ities
ctor
. 3eri#y that the resort does not exist 7. Enter resort description 8. -loop Enter #acilities in#ormation :. -loop Enter accommodations in#ormation E'ception conditions6
. Resort already exists
S$stem
. Chec+ dataase #or resort in#ormation 7. Create resort record 8. Create #acilities record :.. Create accommodations record
Systems Analysis and Design in a Changing World, sixth edition
5-2
Systems Analysis and Design in a Changing World, sixth edition
#. raw an acti%it$ dia"ram to show the flow of acti%ities for the use case Add a new resort .
@ote2 !his activity diagram is ased on the updated prolem domain model.
5-#/
Systems Analysis and Design in a Changing World, sixth edition
&. raw a state machine dia"ram showin" the state and transitions for a 8eser%ation ob3ect.
State
E'it transition
'pen
Ful#ill reservation, cancel reservation
Ful#illed Canceled
5-#1
Systems Analysis and Design in a Changing World, sixth edition
5-#2
Running Cases! +n the Spot Courier Servies 1. 7ased on this description de%elop the followin" for the use case Reuest a pa'age pi'up and for the Web customer scenario6 i. full$ de%eloped use case description ii. n acti%it$ dia"ram iii. n SS
& #ully developed use case description Use case name6
Request a pac+age pic+up
Scenario6
Ge customer requests pac+age pic+up
=ri""erin" e%ent6
Ge customer has pac+age-s to e pic+ed up and requests pic+up
7rief description6
)ser enters pac+age in#ormation -!' address, type o# service, si4e9$eight. *ystem returns the cost, expected pic+up time, and prints lael
ctors6
Ge customer
8elated use cases6
Request pac+age pic+up -phone in Enter pac+age in#o -pic+up pac+age
Staeholders6
(ill, Customer, 1elivery employee
Preconditions6
Customer and customer account must exist
Postconditions6
Pic+up request is created and associated $ith Customer
9low of acti%ities
ctor
. For each pac+age . Enter type o# service .7 Enter !' in#ormation .8 Enter pac+age si4e9$eight
.: Request lael print
E'ception conditions6
.:. ;ael cannot print
S$stem
.8. 1isplay Cost .8.7 1isplay expected pic+up time .8.8 Create Request record Create Pac+age record .:. Print lael
Systems Analysis and Design in a Changing World, sixth edition
n acti%it$ dia"ram
S$stem se0uence dia"ram
5-##
Systems Analysis and Design in a Changing World, sixth edition
5-#&
2. 7ased on the same description de%elop the followin" for the use case Pi'up a pa'age6 i. full$ de%eloped use case description ii. n acti%it$ dia"ram iii. S$stem se0uence dia"ram
& #ully developed use case description Use case name6
Pic+up a pac+age -Enter pac+age pic+up in#ormation
Scenario6
1elivery employee pic+s up pac+age
=ri""erin" e%ent6
1elivery employee arrives at customerIs location and pic+s up a pac+age
7rief description6
1elivery employee veri#ies pac+age $ith pic+up request in#ormation, 'R enters ne$ pac+age in#ormation. 6# cash customer, process payment.
ctors6
1river
8elated use cases6
Create customer and customer account &ccept payment *can pac+age -movement
Staeholders6
Customer, 1river, (ill
Preconditions6
Customer should exist -else invo+e Create customer use case
Postconditions6
Create pac+age record and connect $ith Customer, Pic+upRequest, Movement event
9low of acti%ities
ctor
S$stem
. 6# pac+age has @' lael, search #or . &ccess pic+up in#o, update request y Customer name pac+age 6# no pic+up in#o, display none 7. 6# pic+up request not #ound, enter ne$ pac+age in#o 8. Request print lael :. *can pac+age lael
7. Process ne$ pac+age in#o
8.Print lael :. )pdate pic+up request, pac+age Create pic+up MovementEvent 5. 6# cash customer, enter payment in#o 5. Process payment E'ception conditions6
5. 6nvalid payment data
Systems Analysis and Design in a Changing World, sixth edition
n acti%it$ dia"ram
5-#5
Systems Analysis and Design in a Changing World, sixth edition
5-#)
s$stem se0uence dia"ram.
#. 1evelop a state machine diagram descriing all the possile status conditions #or a Pac+age oect. State
E'it transition
Pending pic+up
pac+agePic+up -
Pic+ed up
arrive&tGarehouse -
&t $arehouse
loaded'n1elivery!ruc+ -
'ut #or delivery
delivered -
1elivered
none
;ost
#ound -
Systems Analysis and Design in a Changing World, sixth edition
5-#+
Running Cases! Sandia -edial Devies 9i"ure 5-22 shows a set of use cases for the patient and ph$sician actors. nswer the followin" 0uestions and*or complete the followin" e'ercises6 1. Which use cases include which other use cases? odif$ the dia"ram to incorporate included relationships.
2. Consider the use cases .iew/respond to alert and .iew history. 7oth actors share the latter but each has a different %ersion of the former. Wh$ do the actors ha%e different %ersions of the .iew/respond to alert use case? Would the dia"ram be incorrect if each actor had his own %ersion of the .iew history use case? Wh$ or wh$ not? .iew/respond to alert! Even though the names are the same, the detail steps might e very di##erent. 6t $ould e possile to ma+e them di##erent scenarios o# the same use case. (u t ma+ing them separate use cases also $or+s since the actors are di##erent, the steps are di##erent, and the system responses are di##erent. .iew history! 3ie$ history does the same activities no matter $ho the actor is. 6n this case it $ould not ma+e sense to have separate use cases since the processing steps, the data, the activities are oth the same.