Sheet 5 OO UML

IE462 Sheet # 5: Object-Oriented Analysis and Design : UML models
Problem # 5.1:
Study the following are OO UML diagrams for product Webstore (Internet based), and answer the
questions:
: Product Agent
: Customer
Request Product & quantity
: Database Server
Check product ID & quantity
OK
Offer product & quantity
Accept offer
Request card information
Credit card information
Put product quantity on hold
OK
Request authorization (Name, card number, amount)
Authorization approved
Confirm sale
OK
<<Actor>>
: Master card Authorization
service
Debit credit card (card # , amount)
Charge accepted
Commit sale
Final confirmation
OK
Answer the following questions:
A. What are the numbers and names of use cases ? what are numbers and naemes of actors? How
many use cases outside the system boundaries?
B. What are the number and names of activities? What are the number of decision points? What
are the number of terminals? What are the number of forks? What are the number of joins?
C. How many states of the webstore system? How many transitions? What are the names and
actions of the system's states .
D. In the sequence diagram, how many objects are communicating? How many messages that has
a method call returning a value?
E. What are the communication messages in the sequence diagram that correspond to the actvity:
"Offer product"
F. In the class diagram, what are the number of optional relationship cardinalities?
Problem # 5.2:
Read the following case of Weather monitoring system and then answer the questions.
The system allows a valid or authorized user (‫ )مستخدم معتمد أو مصرح له إستخدام النظام‬to measure temperature,
pressure, and humidity by means of sensors, provided that the controller initiate the process. The user has
to specify the date and the time. The controller is the person who monitors and manage the entire system.
Measuring temperature, pressure, and humidity are actions done by the sensor. The keypad is used to
specify the time and date. After measuring, the system has to display the value. The OO UML diagram of
the system are as follows:
Specify time and date
<<inc
lu
de>>
Keypad
Measuring temperature
«extends»
Sensor to measure
«extends»
Measuring pressure
Person
«extends»
Measuring humidity
Display
<<usage>>
Controller
: Person
: Controller
: Temperature_ measurement
: Pressure_measurement
: Humidity_measurement
Specify time & date
Measure pressure
Display pressure
Measure temperature
Display temperature
Measure humidity
Display humidity
Display finished
Abort
Validation
Specifying
time & date
Invalid user
Initiating
sensors
Measure temperature
Measure pressure
Display
Measure humidity
: Display
Person
-Name : char
-Age : int
-Sex : char
-Previlige : int
+Specify() : void
+Change() : void
Keypad
-type : int
+Press() : void
*
*
*
«uses»
ec
ifie
d
*
*
Temperature Sensor
-Temperature : int
+CurrentTemperature() : void
+SetLowTemp() : void
+SetHighTemp() : void
*
Pressure Sensor
-Pressure : int
+CurrentPress() : void
+SetLowPress() : void
+SethighPress() : void
*
*
Press
Display
lay
*
p
Tem
*
Humidity Sensor
-Humidity : int
+CurrentHumidity() : void
+SetLowHumid() : void
+SetHighHumid() : void
Hu
D i s mi d
pla
y
Sp
TimeDate
-Time : int
-Date : int
+CurrentTime() : void
+CurrentDate() : void
+SetFormat() : void
+SetHour() : void
+SetMinute() : void
+SetSecond() : void
+SetDate() : void
+Manage() : void
+Modify() : void
+Control() : void
Disp
Specify
Controller
*
*
Display
+SetSize() : void
+SetStyle() : void
Answer the following questions:
A. What are the numbers and names of use cases ? what are numbers and names of actors?
B. What are the number and names of activities? What are the number of decision points? What are
the number of terminals? What are the number of forks? What are the number of joins?
C. In the sequence diagram, how many objects are communicating? What are the communication
messages corresponding to the “Display” use case?
D. In the class diagram, what are the operations correspond to the activity “Specifiying time and
date”? what are the operations corresponding to “Measure pressure” and “Initiating sensors”
activities.
Problem # 5.3: Study the following Preventive Maintenance program at ACME MACHINE
SHOP, and then solve the problem requirements
ACME Machine Shop Case
Introduction
The ACME Machining Company is a small job shop that provides machining services. The
company owns ten general-purpose computer numerical control machine tools and employs 15
people, 8 of whom are tool designers and machine tool operators. The company provides
machining services to other manufacturers in the area who require machining services done that
they are not interested in doing in-house. Therefore, ACME’s orders from customers are usually
for high precision or special-purpose machined parts in small lots. The most important assets of
the business are the highly trained tool designers and machinists, and the very expensive
precision tools owned by the company. The owner of the company has a simple view of his
business: whenever a machinist or a machine is idle and there are jobs waiting to be processed,
the company is losing money. Therefore, the owner has always put a high priority on machine
maintenance, especially preventive maintenance, to avoid unnecessary downtime.
The preventive maintenance function:
Maintenance is the responsibility of the plant supervisor, Mr. Bill Wrench. Bill has set up the
entire preventive maintenance program for the plant, which consists of regularly performing
certain preventive maintenance tasks based on the number of hours of operation on a machine.
The manufacturers of each of the 10 machine tools have provided Bill with a list of preventive
maintenance tasks and the frequency with which they are to be done. The company owner has
suggested to Bill that he maintain records of the preventive maintenance functions in a computer
database. The owner has heard that there are inexpensive database systems that can be purchased
and used for this purpose. Also, a nearby college has students that are knowledgeable about the
use of databases, and they can be hired as interns to help to design the application. Bill decides to
follow-up on his boss’s suggestion, and he hires you to advise him on the design.



Small job shop is doing machining services. It has 10 computer numerical control (CNC).
15 workers in the shop; 8 tool designers and machine tool operators. Customer’s orders
require highly trained tools designers and machinists, in order to obtain high precision
and special purpose machine parts (small lots).
The objective of the owner of the shop is to prevent idle times and waiting times due to
machines breakdowns to avoid losing money. He decided to use preventive maintenance
(PM) programs to avoid downtimes. In PM program, certain PM tasks are regularly
performed based on the number of operation of the machine. This information is given by
the machines’ vendors as in the following table:
The maintenance program is managed by maintenance supervisor and assists him
maintenance technician.
 Machines have meters to keep recording operating hours. The manufacturing department
collects the meter readings of machines operating hours and sends them to the
maintenance supervisor. After receiving the machines operating hours, maintenance
supervisor adds those hours to the record, as in the following table:

Then, the maintenance supervisor looks up the preventive maintenance schedule for each
machine and compares it to the sum of the hours of operation in the kept record. When
the number of operating hours from last time of PM (known from the completed
maintenance records) of a machine reaches the PM frequency, a request for PM task is
made through a work order. Work orders being performed is called open, until they
finished called completed work order that stored in the completed maintenance records.
The maintenance technician performs the PM task. The PM work order appears as
follows:

The work order number is a unique number. The machine ID is used to identify the
specific machine. The machine hours, which show how many total hours were on the
machine when the new maintenance.
Other data requirements are as follows:
Machine data table:
Requested summary reports:
Problem requirements:
Create a set of UML diagrams (use case, sequence, activity, state diagrams, and class diagrams)
that describe the static, functional and dynamic characteristics and behavior for the process of
operating the preventive maintenance function.
Problem # 5.4: Study the following shipping department activities at University Food Company
case, and then solve the problem requirements:
The University Food Company wants to use more information technology into its organization,
particularly its shipping department. The shipping department currently uses information from
sales and production planning departments in the course of doing its daily tasks. The shipping
supervisor wants to let someone study the activities in the department and to recommend an
information system design to support the operation.
What follows is a description of the tasks performed by the shipping clerk and support personnel
during a typical day:

At the beginning of each day, the sales department prints a report and sends it to the
shipping department. This report, called the “Open Orders Report,” is a list of orders
taken by sales that have not been closed out. Orders are not closed out until the final
shipment has been made against the order. An example of a typical open orders report is
shown in the following figure. Open orders are listed in the ascending order of their
promised delivery date (e.g., earliest first).

University Food plans its production in two ways: produce to order and produce to
inventory. In the first case, production is scheduled for a specific order. In the second
case, production is done in the absence of a specific order. The second case occurs
because a specific order is small and it is desirable to have a longer production run before
changing over to another product. Changeovers ‫التبديل أو اإلنتقال إلى و اإلعداد لمنتج غذائي مختلف‬
require that the machinery is thoroughly cleaned before the next product can be made,
and is costly. The excess production is placed in inventory and is available for shipment
the next time a customer orders the product

The shipping clerk receives a report (printout) of the finished goods inventory from the
production planning department, showing the location of the finished goods inventory by
inventory lot. The report is ordered by material ID in the ascending order ‫تصاعديا‬.

The shipping clerk examines each of the open orders and determines whether or not there
exists a matching product inventory lot. If the match occurs, a shipment can be made. A
typical finished product inventory report is shown in the following table:

After identifying an inventory lot that can be shipped, the shipping clerk dispatches ‫يرسل‬
the forklift truck operator to the warehouse to fetch )palletts( ‫ يجلب أو يحضر‬items to be
shipped. He does this by giving instructions to the driver (forklift truck operator)
concerning the lot number and location of the product.

The forklift truck operator collects the items and brings them on pallets (‫ )األرفف الحاملة‬to
the shipping dock. He informs the shipping clerk that the pallets have been retrieved and
gets his next assignment.

It is the responsibility of the shipping clerk to keep a daily record (DB) of everything that
is transferred out of the warehouse for shipping and to indicate on the record the
customer order against which it is shipped. The shipping clerk completes this record
when pallets are brought to the loading dock. This document is transferred at the end of
the day to the sales department where it is used as the source of information to close out
sales orders.
The warehouse transfer report, shown in the following figure:

After completing an entry on the warehouse transfer report, the shipping clerk directs his
shipping personnel to load the cases of product on to a truck. As cases are being loaded,
he fills out another important report maintained by the shipping clerk, the shipping
summary report.

This report is kept daily and held in a file (DB summary report) in the shipping
department. It describes the quantity of cases that are shipped, the customers to whom
they are shipped, and the truck number on which they are shipped. A typical shipping
summary report is shown as follows:
Shipping Summary, 11/01/03

University Food maintains its own fleet of trucks ‫أسطول سيارات‬, which is managed by the
company’s transportation department. The shipping department is only responsible for
tracking the shipment to the truck on which it is dispatched. The transportation
department is responsible for tracking deliveries to the final customer.

For each customer shipment on a truck, the shipping clerk prepares a bill of laden ‫فاتورة‬
‫ الشحن‬for the truck driver after the cases of product are loaded on the truck. Most of the
information for the bill of laden is taken off the shipping summary and open orders
reports. A copy of the bill of laden is sent to the transportation department at this time,
and the other copies are given to the truck driver. No copies are kept in shipping (i.e., no
kept in a database…no data store).

This bill of laden is presented to the customer when the driver arrives at the customer’s
receiving location. A signed copy of the bill of laden is turned in to the transportation
department when the driver returns from a delivery. The transportation department
matches this copy to the one sent by the shipping department and closes out the delivery
in its records. A typical bill of laden is shown as follows:
Problem Requirements:
Create a set of UML diagrams (use case, sequence, activity, state diagrams, and class diagrams)
that describe the static, functional and dynamic characteristics and behavior for the process of
operating the shipping department.
Problem # 5.5: Study the following USF Rent-a-Car, then answer the problem requirements
USF Rent-a-Car wish to implement IT to control all aspects of its operations, including tracking
car inventories, rental contracts, and billing.
The following discussion of the reservation process will help you identify some attributes.
Assign the attributes to the appropriate entities. Indicate primary key and foreign key attributes.
Car rental rates are determined by the class of the car. USF Rent-a-Car has two rental rates for
each class: daily and weekly. The car model includes a make (Ford, Honda, etc.), the year of the
model, and the model name. Each car is uniquely identified by a vehicle identification number
(VIN). The branch to which the vehicle is assigned has an address and a location ID. The process
of renting a car is as follows. Typically, a customer first makes a reservation with a location by
telephone prior to arriving at the branch location to pick up the car. The USF Rent-a-Car service
representative takes the customer name and address and the class of vehicle and period of rental
(date and time in and out) that the customer desires. The customer is informed of the rental rate.
When the customer arrives at the branch location to pick up the car, the service representative
first checks for a reservation and, if a reservation exists, she draws up a rental agreement. At that
time the service representative obtains other customer information, such as his operator’s license
number and state that issued it and the customer’s credit card type and number, including the
expiration month and year. If the customer has made a reservation, then the reservation
information is used to assign a specific vehicle to the rental agreement. If the customer is a walkin (no reservation), the service representative fills out the reservation information first as part of
the process. All rentals must be associated with a reservation. The rental agreement has a
contract number that uniquely identifies it, the VIN number of the vehicle that is being rented,
the current date and time for the rental to start, and a current odometer reading. The customer is
given copy of the rental agreement along with the keys to the car. This ends the activities at the
time the vehicle is picked up.
After use, the car is returned to the branch location. Information that will be filled in when the
car is returned is the date and time at which the rental ends and the ending odometer reading.
When the rental agreement is completed, the actual cost of the rental is computed using the class
rental rate and the cost is charged to the customer’s credit card. No other form of payment is
accepted.
Problem requirement:
Given the above description, create a set of UML diagrams (use case, sequence, activity, state
diagrams, and class diagrams) that describe the static, functional and dynamic characteristics and
behavior for the process of servicing customer during rental pick up.