Professional Documents
Culture Documents
d. In the Unified Process (UP) timeboxing means that a team cannot extend the time spent
in an iteration when developers are having problems implementing a feature.
e. The iterative/incremental process model is more radical than the waterfall process
model.
Object
equals(o:Object):Boolean
Automobile
equals(o:Automobile): Boolean
equals(o:Object): Booleans
circle which equals() methods is called for each call given below
a. auto1.equals(obj);
equals(o:Object) in Object
equals(o:Object) in Automobile
equals(o:Automobile) in Automobile
b. auto2.equals(obj);
equals(o:Object) in Object
equals(o:Object) in Automobile
equals(o:Automobile) in Automobile
c. auto1.equals(auto2);
equals(o:Object) in Object
equals(o:Object) in Automobile
equals(o:Automobile) in Automobile
Part 2: Short answer questions (4 questions; 30 points)
1. (4 points) For each of the following associations, indicate whether it should be a plain
association (Assoc), or composition/strong aggregation (Comp) – indicate only one (They can all
be modeled as plain associations, but no marks will be given if you indicate Assoc but the
association is more accurately represented by a composition). Justify your answer in each case;
if your justification is wrong then your entire answer is wrong.
Justify: If an organization is deleted its employees are not. If you selected Comp then
you have to rationalize why employees are deleted when an organization is deleted
(e.g., you can argue that employee is a role, not a person, that is owned by the
company and thus is deleted when the organization is deleted)
Justify: When a file is deleted its contents are also deleted. If you circle Assoc you will
have to justify why the contents are not deleted.
2. (This question will appear in a future quiz) The following are examples of classes in the design
of an Airport Management System (AMS). Circle the strongest form of cohesion that each class
has. Justify your answer in each case; if your justification is wrong then your entire answer is
wrong.
a. A class that has a method that reads and parses the input file used to create the initial
Airport System, and also a method that displays the user interface for entering seat
bookings.
Justify:
b. A class that reads and parses the input file used to create the initial Airport System.
3. (This question will appear in a future quiz) State what type of coupling the following module
relationships have (Circle the strongest form of coupling that applies):
a. An object calls the method calculateWitholdingTax(employeeRecord) defined in another
object, but only part of the employer record is actually used in the tax computation
method that is called.
Justify:
b. Module p calls module q, and q passes back a flag that forces p to print an error
message.
Justify:
4. (10 points) How does data abstraction differ from functional abstraction? Give an example of each
type of abstraction in your answer. (Please write legibly; if we cannot understand your handwriting
you will get 0 for this question)
In data abstraction the form or representation of the data is abstracted out, that is, a user of the
data does not how the data is represented, the user knows about the data only through the
operations that manipulate it. In functional abstraction the implementation of an operation is hidden
from the user, that is, a user does not have knowledge of how a method is implemented.
Part 3: Modeling questions (4 questions; 60 points)
1. (20 points) An organization has three categories of employees: professional staff, technical staff
and support staff. The organization also has departments and divisions (collectively called
organization units). Each employee belongs to exactly one department or exactly one division (an
employee cannot belong to a department and a division). An employee can change his or her
category over time. At any given time, an employee must be in one of the three categories.
Complete the class model describing the above given below. You will need to add new classes and
relationships. You must include role names and multiplicities on each end of an association. You
do not need to include navigability symbols on association ends.
Organiztion
org 1
units *
1 * * 1 Organization
Status Employee
status emps Unit
employees empUnit
Division Department
Professional Techical
Support
2. (20 points) The following is a design class model of a car registration system created by a
novice modeler. The following methods are included in the design:
Point out all the deficiencies and bad practices in the model (do not give missing
operations, missing attributes, bad operation, variable, role names as part of your
answer). Draw an improved design class model. You can show only the operation names in
the diagram you draw – no need to show parameter values or return values since these
should not change from the original model. State any assumptions you make (points will
only be awarded for reasonable assumptions). Space is provided on the next page for your
diagram.
What if a driver
drivers has multiple
* licenses (for
multiple vehicles
driverLicID is Driver *
vehicles)? This vehicleID is
unique to a driver
information unique to a
name: String should be placed Vehicle vehicle
driverLicID:String in a separate
vehicleLicenseNum: String class. vehicleID:Integer
vehicleRegistrationTax: Integer make: String
vehiclesOwned: List Vehicle year: String
homeAddr1, homeAddr2: Address driverName:String
workAddr1, workAddr2: Address Visually better to
getDriver():Driver
represent this
createVehicle(vehicleID:Integer)
Visually better to relationship as an
Multiple association
addresses that represent this
could change; reference as an
better to make a association
class called
Address with an
association to
Driver
Draw the modified diagram for Question 2 below the original diagram (show all multiplicities and
navigability symbols in your answer; remember to put role names on all association ends):
Vehicle Registration Manager
driverManager carManager
1 1
drivers
*
licDriver getDriver():Driver
createVehicle(vehicleID:Integer) 1
licVeh
1
hdrivers
* *
wdrivers
1..* lic
licenses 0..1
customer bookedSeats
Customer AirlineSeat
0..30 0..20
Booking
reservedDate:Date
1 seatBookings bookings 1
Customer Booking AirlineSeat
cust 0..20 0..30 seat
4. (10 points) The following is part of a design class model of a video rental system. In the
system, video outlets stock copies of videos. Each outlet maintains a catalog of video
descriptions. Each copy stocked by an outlet has a description in the outlet’s catalog. A
customer can rent 0 or more video copies from any outlet.
renter rentedCopies
0..1 *
*
Customer videoCopy
stocks
1 located-in copies
*
VideoOutlet
1
description
1..* cataloged-in
1..* VideoDescription
CONSTRAINT: A video
copy located-in a video outletVideos
title
outlet must have a
description cataloged-in the
same video outlet
For each of the two (2) object models given below state whether it is valid or not with respect
to the above class model. If the object model is invalid circle all the elements (objects, links)
that violate constraints in the class model (e.g., an association multiplicity constraint or the
constraint associated with VideoOutlet) and describe the constraint violated. Please note that
VideoOutlet has a constraint on it “A video copy located in a video outlet must have a
description cataloged in the same video outlet”. This constraint must be satisfied by valid
object diagrams.
Object Model 1 INVALID
outlet1:VideoOutlet outlet2:VideoOutlet
desc1:VideoDescription
desc2:VideoDescription desc3:VideoDescription
cust1:Customer cust2:Customer
*
Customer videoCopy
stocks
1 located-in copies
*
VideoOutlet
1
description
1..* cataloged-in
1..* VideoDescription
CONSTRAINT: A video
copy located-in a video outletVideos
title
outlet must have a
description cataloged-in the
same video outlet
Copy not
associated with
outlets that do not
have a
cust1:Customer cust2:Customer description for the
video