You are on page 1of 2

Exercises

1. Based on the following description of a shipmentmade by Union


Parcel Shipments, identify all thestates and exit transitions and then
develop a statemachine diagram.

A shipment is first recognized after it has beenpicked up from a customer. Once in the
system, itis considered active and in transit. Every time itgoes through a checkpoint, such as
arrival at anintermediate destination, it is scanned and a recordis createdindicating the time
and place of thecheckpoint scan. The status changes when it isplaced on the delivery truck. It
is still active, butnow it is also considered to have a status ofdelivery pending. After it is
delivered, the statuschanges again.

From time to time, a shipment has a destinationthat is outside the area served by Union.
Inthose cases, Union has working relationships withother courier services. After a package is
handedoff to another courier, it is noted as being handed over. In those instances, a tracking
number for thenew courier is recorded (if it is provided). Unionalso asks the new courier to
provide a statuschange notice after the package has beendelivered.

Unfortunately, from time to time, a packagegets lost. In that case, it remains in an active
statefor two weeks but is also marked as misplaced. Ifafter two weeks the package hasn’t
been found, itis considered lost. At that point, the customer caninitiate lost-package
procedures to recover anydamages.

2. After reading the following narrative, do thefollowing:


a. Develop an activity diagram for each scenario.
b. Complete a fully developed use case descriptionfor each scenario.

A contractor buys materials by taking them tothe checkout desk for contractors. The clerk
entersthe contractor’s name into the system. The systemdisplays the contractor’s information,
includingcurrent credit standing. The clerk then opens up anew ticket (sale) for the
contractor. Next, the clerkscans in each item to be purchased. The systemfinds the price of
the item and adds the item to theticket. At the end of the purchase, the clerk indicatesthe end
of the sale. The system compares thetotal amount against the contractor’s current creditlimit
and, if it is acceptable, finalizes the sale. Thesystem creates an electronic ticket for the
items,and the contractor’s credit limit is reduced by theamount of the sale. Some contractors
like to keep arecord of their purchases, so they request thatticket details be printed. Others
aren’t interested ina printout.

A sale to the general public is simply enteredinto the cash register, and a paper ticket is
printedas the items are identified. Payment can be by cash,check, or credit card. The clerk
must enter the typeof payment to ensure that the cash register balancesat the end of the shift.
For credit card payments,the system prints a credit card voucher that thecustomer must sign.

You might also like