Professional Documents
Culture Documents
You have 50 minutes to complete this exam. Please answer all questions in the space provided.
Because of a glitch in EU-Rent’s file server, many of the analysis and design documents for the
system have been lost. You have been assigned to code the ReceiveVehicle Use Case, for which there
are two extant documents: 1) Some User Interview Notes recorded by the systems analyst of update
events that might impact the system (directly below), and 2) a sequence diagram (on the last page of
this exam). Your job is to read these documents, answer the questions below, and reproduce the
system documentation you will need to code your piece, as per questions 1 through xx.
User Interview Notes: To begin with, a vehicle is received at a rental branch, and a record of
it is maintained in the system until the vehicle is written off. During its life, it may be taken out of the
rental branch’s stock (for example, while it is on contract to a customer), but it is still
considered to be owned by the branch. During the vehicle’s life it may be transferred between rental
branches, which effectively changes the vehicle’s branch ‘ownership’. A vehicle may be transferred
to another rental branch at any time it is not on a contract.
1. Circle two words in the above narrative that suggest to you which domain classes should be
implemented prior to your coding of the ReceiveVehicle use case.
2. In the space below, and using the attached sequence diagram, list the classes and associated
operations for each class implied by the ReceiveVehicle sequence diagram. Indicate whether
each class is a boundary, control, or domain class.
In the list below, prefixes are used to indicate the ‘type’ of a class.
• UI_ = Boundary class
• CTL_ = Control class
• None = domain class
UI_ReceiveVehicle (0 operation)
Vehicle (5 operations)
receiveVehicle (branch-oid, vehicle-idNbr, rental-price)
setIDNbr (vehicle-idNbr)
setStandardRentalPrice (rental-price)
assignVehicle (branch-oid)
gainRentalBranchLink (branch-oid)
RentalBranch (4 operations)
assignVehicle (my-oid )
GainVehicleLink (vehicle-oid)
IncrementVehiclesOwned ( )
IncrementVehiclesInStock ( )
3. In the space provided on the following page, draw the class diagram implied by the sequence
diagram. Include attributes, relationships, and cardinality, Give only attributes on the class
diagram. Do not include anything not directly implied by the attached sequence diagram!
1 of 3 rev. 8/20/2009
Name ________Solution_________________
4. In the space provided on the following page, mock up a UI implied by the sequence diagram.
5. (optional) The author of the sequence diagram had never themselves coded an application in an
OO programming language, but they had worked in an object-oriented database. What do you
think they meant by including “oid”s in messages on the sequence diagram? Suggest alternate
signatures for these messages:
Vehicle
Vehicle-idNbr 1..1 RentalBranch
StandardRentalPrice Name
1..m
MyBranch RentalBranch-id
Class: AllVehicles MyVehicles
NVehiclesInStock
Class: AllRentalBranches
NVehiclesOwned
UI_ReceiveVehicle CTL_ReceiveVehicle
1..1
ABranch ABranch
Vehicle-ID Vehicle-ID
Rental-Price Rental-Price
2 of 3 rev. 8/20/2009
Name ________Solution_________________
Receive_Vehicle
Vehicle Received at Branch:
Vehicle ID:
Receive_Vehicle Cancel
3 of 3 rev. 8/20/2009