0% found this document useful (0 votes)
1K views

Exercises

The document describes 8 problems related to modeling systems using UML diagrams. Problem 1 involves a doctor's office appointment scheduling system. Problem 2 involves an online university course registration system. Problem 3 involves a real estate company that sells houses. The problems provide descriptions of systems to model using use case, class, activity, and sequence diagrams.

Uploaded by

Vũ T. Tùng
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views

Exercises

The document describes 8 problems related to modeling systems using UML diagrams. Problem 1 involves a doctor's office appointment scheduling system. Problem 2 involves an online university course registration system. Problem 3 involves a real estate company that sells houses. The problems provide descriptions of systems to model using use case, class, activity, and sequence diagrams.

Uploaded by

Vũ T. Tùng
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

EXERCISES

1. Draw use case diagrams for the following problems (1 to 8). Describe at
least one use case in each diagram.
2. Draw class diagrams.
3. Draw activity diagrams.
4. Choose at least one class for each from class diagrams and draw a state
diagram.
5. Draw sequence or communication diagram for at least one use case in
each of use case diagrams.

Problem 1. The doctor’s office system manages appointments. Whenever new


patients are seen for the first time, they complete a patient information form that asks
their name, address, phone number, and brief medical history, which are stored in the
patient information file. When a patient calls to schedule a new appointment or change
an existing appointment, the receptionist checks the appointment file for an available
time. Once a good time is found for the patient, the appointment is scheduled. If the
patient is a new patient, an incomplete entry is made in the patient’s file; the full
information will be collected when the patient arrives for the appointment. Because
appointments are often made far in advance, the receptionist usually mails a reminder
postcard to each patient two weeks before the appointment.
Problem 2. The online university registration system manages registations. The
system should enable the staff of each academic department to examine the courses
offered by their department, add and remove courses, and change the information
about them (e.g., the maximum number of students permitted). It should permit
students to examine currently available courses, add and drop courses to and from
their schedules, and examine the courses for which they are enrolled. Department staff
should be able to print a variety of reports about the courses and the students enrolled
in them. The system should ensure that no student takes too many courses and that
students who have any unpaid fees are not permitted to register (assume that fees data
are main- tained by the university’s financial office, which the registration system
accesses but does not change).
Problem 3. A Real Estate Inc. (AREI) sells houses. People who want to sell their
houses sign a contract with AREI and provide information on their house. This
information is kept in a database by AREI, and a subset of this information is sent to
the citywide multiple-listing service used by all real estate agents. AREI works with
two types of potential buyers. Some buyers have an interest in one specific house. In
this case, AREI prints information from its database, which the real estate agent uses
to help show the house to the buyer (a process beyond the scope of the system to be
modeled). Other buyers seek AREI’s advice in finding a house that meets their needs.
In this case, the buyer completes a buyer information form that is entered into a buyer
database, and AREI real estate agents use its information to search AREI’s database
and the multiple-listing service for houses that meet their needs. The results of these
searches are printed and used to help the real estate agent show houses to the buyer.
Problem 4. A Video Store (AVS) runs a series of fairly standard video stores. Before
a video can be put on the shelf, it must be cataloged and entered into the video
database. Every customer must have a valid AVS customer card in order to rent a
video. Customers rent videos for three days at a time. Every time a customer rents a
video, the system must ensure that he or she does not have any overdue videos. If so,
the overdue videos must be returned and an overdue fee paid before customer can rent
more videos. Likewise, if the customer has returned overdue videos but has not paid
the overdue fee, the fee must be paid before new videos can be rented. Every morning,
the store manager prints a report that lists overdue videos. If a video is two or more
days overdue, the manager calls the customer to remind him or her to return the video.
If a video is returned in damaged condition, the manager removes it from the video
database and may sometimes charge the customer.
Problem 5. The gym membership system manages members. When mem- bers join
the gym, they pay a fee for a certain length of time. Most memberships are for one
year, but memberships as short as two months are available. Throughout the year, the
gym offers a variety of discounts on their regular membership prices (e.g., two
memberships for the price of one for Valentine’s day). It is common for members to
pay different amounts for the same length of membership. The gym wants to mail out
reminder letters to members asking them to renew their memberships one month
before their memberships expire. Some members have become angry when asked to
renew at a much higher rate than their original membership contract, so the club wants
to track the prices paid so that the manager can override the regular prices with spe-
cial prices when members are asked to renew. The system must track these new prices
so that renewals can be processed accurately. One of the problems in the industry is
the high turnover rate of members. Although some members remain active for many
years, about half of the members do not renew their memberships. This is a major
problem, because the gym spends a lot in advertising to attract each new member. The
manager wants the system to track each time a member comes into the gym. The
system will then identify the heavy users and generate a report so that the manager can
ask them to renew their mem- berships early, perhaps offering them a reduced rate for
early renewal. Likewise, the system should identify members who have not visited the
gym in more than a month, so the manager can call them and attempt to reinterest
them in the gym.
Problem 6. Picnics R Us (PRU) is a small catering firm with five employees. During
a typical summer weekend, PRU caters fifteen picnics with twenty to fifty people
each. The business has grown rapidly over the past year, and the owner wants to
install a new computer system for man- aging the ordering and buying process. PRU
has a set of ten standard menus. When potential customers call, the receptionist
describes the menus to them. If the customer decides to book a picnic, the receptionist
records the customer information (e.g., name, address, phone number) and the
information about the picnic (e.g., place, date, time, which one of the standard menus,
total price) on a contract. The customer is then faxed a copy of the contract and must
sign and return it along with a deposit (often a credit card or by debit card) before the
picnic is officially booked. The remaining money is collected when the picnic is
delivered. Sometimes, the customer wants something special (e.g., birthday cake). In
this case, the receptionist takes the information and gives it to the owner, who
determines the cost; the receptionist then calls the customer back with the price
information. Sometimes the customer accepts the price; other times, the customer
requests some changes that have to go back to the owner for a new cost estimate. Each
week, the owner looks through the picnics scheduled for that weekend and orders the
supplies (e.g., plates) and food (e.g., bread, chicken) needed to make them. The owner
would like to use the system for marketing as well. It should be able to track how
customers learned about PRU and identify repeat customers, so that PRU can mail
special offers to them. The owner also wants to track the picnics for which PRU sent a
contract, but the customer never signed the contract and actually booked a picnic.
Problem 7. Of-the-Month Club (OTMC) is an innovative young firm that sells
memberships to people who have an interest in certain products. People pay
membership fees for one year and each month receive a product by mail. For example,
OTMC has a coffee-of-the-month club that sends members one pound of special
coffee each month. OTMC currently has six memberships (coffee, wine, beer, cigars,
flowers, and computer games), each of which costs a different amount. Customers
usually belong to just one, but some belong to two or more. When people join OTMC,
the telephone operator records the name, mailing address, phone number, e-mail
address, credit-card information, start date, and membership service(s) (e.g., coffee).
Some customers request a double or triple membership (e.g., two pounds of coffee,
three cases of beer). The computer game membership operates a bit differently from
the others. In this case, the member must also select the type of game (action, arcade,
fantasy/science fiction, educational, etc.) and age level. OTMC is planning to greatly
expand the number of memberships it offers (e.g., video games, movies, toys, cheese,
fruit, and vegetables), so the system needs to accommodate this future expansion.
OTMC is also planning to offer three-month and six-month memberships.
Problem 8. Holiday Travel Vehicles sells new recreational vehi- cles and travel
trailers. When new vehicles arrive at Holiday Travel Vehicles, a new vehicle record is
cre- ated. Included in the new vehicle record are a vehicle serial number, name,
model, year, manufacturer, and base cost. When a customer arrives at Holiday Travel
Vehi- cles, he or she works with a salesperson to negotiate a vehicle purchase. When a
purchase has been agreed upon, a sales invoice is completed by the salesperson. The
invoice summarizes the purchase, including full customer information, information on
the trade-in vehicle (if any), the trade-in allowance, and infor- mation on the
purchased vehicle. If the customer requests dealer-installed options, they are listed on
the invoice as well. The invoice also summarizes the final negotiated price, plus any
applicable taxes and license fees. The transaction concludes with a customer signa-
ture on the sales invoice.
Customers are assigned a customer ID when they make their first purchase from
Holiday Travel Vehi- cles. Name, address, and phone number are recorded for the
customer. The trade-in vehicle is described by a serial number, make, model, and year.
Dealer-installed options are described by an option code, description, and price.
Each invoice lists just one customer. A person does not become a customer until he or
she purchases a vehicle. Over time, a customer may purchase a num- ber of vehicles
from Holiday Travel Vehicles.
Every invoice must be filled out by only one sales- person. A new salesperson might
not have sold any vehicles, but experienced salespeople have probably sold many
vehicles.
Each invoice only lists one new vehicle. If a new vehicle in inventory has not been
sold, there will be no invoice for it. Once the vehicle sells, there will be just one
invoice for it.
A customer may decide to have no options added to the vehicle or may choose to add
many options. An option may be listed on no invoices, or it may be listed on many
invoices.
A customer may trade in no more than one vehicle on a purchase of a new vehicle.
The trade-in vehicle may be sold to another customer who later trades it in on another
Holiday Travel vehicle.
Problem 9. Draw a state diagram that describes the various states that a travel
authorization can have through its approval process. A travel authorization form is
used in most companies to approve travel expenses for employees. Typically, an
employee fills out a blank form and sends it to his or her boss for a signature. If the
amount is fairly small (<$300), then the boss signs the form and routes it to accounts
pay- able to be input into the accounting system. The sys- tem cuts a check that is sent
to the employee for the right amount, and after the check is cashed, the form is filed
away with the canceled check. If the check is not cashed within 90 days, the travel
form expires. When the amount of the travel voucher is a large amount (>$300), then
the boss signs the form and sends it to the CFO, along with a paragraph explain- ing
the purpose of the travel; the CFO signs the form and passes it along to accounts
payable. Of course, the boss and the CFO can reject the travel authori- zation form if
they do not feel that the expenses are reasonable. In this case, the employee can
change the form to include more explanation or decide to pay the expenses.

You might also like