Sie sind auf Seite 1von 20

Q.1 Consider the air transportation system.

Many flights land and


depart from city’s airport. Some of the big cities may have
more than one airport. Every flight belongs to specific airline.
The planes may have many flights to different airports. Each
plane is identified with serial number and model. E.g.
hypersonic. There are specific pilots for each airline and they
fly many flights. Each flight is identified by flight number and
date on which flight is scheduled. The passenger reserves a
seat for a flight. The seat is identified by a location.
Prepare a class diagram for above description.

Q.2 Prepare an object diagram for above description assuming


your round trip in last month to London. Include at least one
instance of each class. The flight was arranged on a
hypersonic plane. A friend went with you but decided to stay
there. Captain Johnson was your pilot on both flights. You had
a different seat each way, but you noticed it was on the same
plane.
Q.3 Consider a vending machine. Consider the processes:

1. Buy a beverage: The vending machine

2. delivers a beverage after a customer selects and pays for it.

3. Perform Scheduled Maintenance: The repair technician performs


the periodic service on the vending machine necessary to keep it in
good working condition.

4. Make repairs: The repair technician performs the unexpected service


on the vending machine necessary to repair a problem in its operation.

5. Load Items: A stock clerk adds items into the vending machine to
add its stock of beverages.
Q.4 The vending machine delivers a beverage after a customer selects and
pays for it. The machine starts in the waiting state in which it displays the
message “Enter coins”. When the customer inserts coins into the machine,
the machine enters into “Ready” state. When the customer pushes the ok
button, the machine goes in “Dispense” state. In this state, the machine
dispenses the corresponding item. The machine goes in “Out of Stock” state
if item is not loaded. Draw the state transition diagram for above
description.

Q.5 The vending machine delivers a beverage after a customer selects and
pays for it. The machine starts in the waiting state in which it displays the
message “Enter coins”. When the customer inserts coins into the machine,
the machine displays total value of money entered. The customer pushes a
button. The machine dispenses a corresponding item and make change, if
the cost of the item is less than the money inserted. If the cost of the item is
greater than money inserted, the machine shows the message as
“Insufficient money”. Draw the sequence diagram for above description.

Q.6 A person may have multiple magazine subscriptions. A magazine has


multiple subscribers. For each subscription, it is important to track the date
and amount of each payment as well as the current expiration date. Draw
the class diagram for above description.

Q.7 A person may have multiple magazine subscriptions. A magazine has


multiple subscribers. For each subscription, it is important to track the date
and amount of each payment as well as the current expiration date. Draw
the class diagram with association class for above description.
Q.8 Consider the free lancing of software development. The programmers
use different programming languages to develop many projects. Assume the
programmer Mr.X is involved in two projects accounting system and CAD
program. Mr. X is using .NET as a programming language and C
Programming for accounting system. Draw the class diagram and instance
diagram for above description. (Hint: Use ternary association)
Q.9 Prepare a class diagram for a graphical document editor that supports
grouping. Assume that a document consists of several sheets. Each sheet
contains drawing objects, including text, geometrical objects and groups. A
group is simply a set of drawing objects. A geometrical object includes circle,
ellipse, rectangles, lines and squares.

Q.10 Prepare an activity diagram for computing a restaurant bill. There


should be a charge for each delivered item. The total amount should be
subject to tax and service charge of 18% for groups of six or more. Any
coupons charge submitted by the customer is subtracted from bill.
Q.11 The following is the partial taxonomy of rotating electrical machines.
Electrical machines may be categorized for analysis purposes into ac
machines or dc machines. Some of the machines are synchronous motors,
small induction motors, universal motors and permanent magnet motors.
An ac machine may be synchronous or induction. Universal motors are used
where high speed is needed such as blenders or vacuum cleaners.
Permanent magnet motors are used in toys and will work only on dc.
Prepare a class diagram showing how the categories and machines relate to
each other. Use multiple inheritances where ever found appropriate.
Q.12 Prepare a class diagram for UML concepts like class, attribute, association,
association end, multiplicity, class name, attribute name.

Q.13 Consider the class for telephone line with following activities and states: As a
start of a call, the telephone line is idle. When the phone receiver is picked from
hook, it gives a dial tone and can accept the dialing of digits. If after getting dial
tone, if the user doesn’t dial number within time interval then time out occurs and
phone line gets idle.
After dialing a number, if the number is invalid then some recorded message is
played.
Upon entry of a valid number, the phone system tries to connect a call & routes it
to proper destination.
If the called person answers the phone, the conversation can occur. When called
person hangs up, the phone disconnects and goes to idle state.
Draw the state transition diagram for above description of telephone line.
Q.14 Consider a simple digital watch which has a display and two buttons to set it,
the A button and the B button. The watch has two modes of operation, display time
mode, the watch displays hours and minutes, separated by a flashing colon.
The set time mode has two submodes: set hours and set minutes. The A button
selects modes. Each time it is pressed, the mode advances in sequence: display,
set hours, set minutes, display etc.
Within the submodes, the B button advances the hours or minutes once each time
it is pressed. Buttons must be released before they can generate another event.
Draw the state transition diagram for above described digital watch.
Q.15 Develop a class diagram for following description:
The telephone agent uses an order registry and customer catalog to obtain access
to an order & a customer respectively.
The order registry uses an order number as a qualifier to select particular order
instance. A customer catalog uses customer name and phone number as a qualifier
to select particular customer.
The attributes of an order are the order numbers and time when it is placed. The
order consists of many items.
An item has item_number, a quantity, unit price. It also has reference to catalog
item which represents listing.
When an order is cancelled or committed, it cancels or commits each of its items
first.
When an order’s total price method is invoked, the order calls the total price
method of each of items and returns the sum.

Q.16 The telephone agent uses an order registry and customer catalog to obtain
access to an order & a customer respectively.
The order registry uses an order number as a qualifier to select particular order
instance. A customer catalog uses customer name and phone number as a qualifier
to select particular customer.
The attributes of an order are the order numbers and time when it is placed. The
order consists of many items.
An item has item_number, a quantity, unit price. It also has reference to catalog
item which represents listing.
When an order is cancelled or committed, it cancels or commits each of its items
first.
When an order’s total price method is invoked, the order calls the total price
method of each of items and returns the sum.
The telephone agent wants to cancel the item with item number as I101 from order
having order number O123. Show the messages in sequence diagram for
cancellation of item.

Q.17 The telephone agent uses an order registry and customer catalog to obtain
access to an order & a customer respectively.
The order registry uses an order number as a qualifier to select particular order
instance. A customer catalog uses customer name and phone number as a qualifier
to select particular customer.
The attributes of an order are the order numbers and time when it is placed. The
order consists of many items.
An item has item_number, a quantity, unit price. It also has reference to catalog
item which represents listing.
When an order is cancelled or committed, it cancels or commits each of its items
first.
When an order’s total price method is invoked, the order calls the total price
method of each of items and returns the sum.
The telephone agent wants to cancel the item with item number as I101 from order
having order number O123. Show the messages in collaboration diagram for
cancellation of item.
Q.18The telephone agent uses an order registry and customer catalog to obtain
access to an order & a customer respectively.
The order registry uses an order number as a qualifier to select particular order
instance. A customer catalog uses customer name and phone number as a qualifier
to select particular customer.
The attributes of an order are the order numbers and time when it is placed. The
order consists of many items.
An item has item_number, a quantity, unit price. It also has reference to catalog
item which represents listing.
When an order is cancelled or committed, it cancels or commits each of its items
first.
When an order’s total price method is invoked, the order calls the total price
method of each of items and returns the sum. Prepare a use case diagram for
above description.
Q.19 Develop a class diagram to track states of machines in a factory consisting of
several machines. Each machine is in one of several states: running, idle, waiting,
down for unscheduled maintenance, down for scheduled maintenance or off.
A running machine is currently processing an order. An idle machine is available for
processing but is currently without an order to process. The machine is in down
state for scheduled or unscheduled maintenance. The operator is responsible to
change the state.
Each machine has maintenance schedule. Each schedule has a date of last
maintenance and date of next scheduled maintenance.
When the date of next maintenance arrives, the operator sends the machine down
for scheduled maintenance.
Each machine is connected to a failure monitor, which senses hardware failure in
the machine. When the monitor senses a failure, it informs the machine. The
machine changes to the unscheduled maintenance state.
All changes of machine states must be entered in a log. Each entry in the log
includes date and time of the state change, which machine changed state, the
states from and to.

Q.20 Develop a state transition diagram to track states of machines in a factory


consisting of several machines. Each machine is in one of several states: running,
idle, waiting, down for unscheduled maintenance, down for scheduled maintenance
or off.
A running machine is currently processing an order. An idle machine is available for
processing but is currently without an order to process. The machine is in down
state for scheduled or unscheduled maintenance. The operator is responsible to
change the state.
Each machine has maintenance schedule. Each schedule has a date of last
maintenance and date of next scheduled maintenance.
When the date of next maintenance arrives, the operator sends the machine down
for scheduled maintenance.
Each machine is connected to a failure monitor, which senses hardware failure in
the machine. When the monitor senses a failure, it informs the machine. The
machine changes to the unscheduled maintenance state.
All changes of machine states must be entered in a log. Each entry in the log
includes date and time of the state change, which machine changed state, the
states from and to.

Q.21 Develop a use case diagram to track states of machines in a factory consisting
of several machines. Each machine is in one of several states: running, idle,
waiting, down for unscheduled maintenance, down for scheduled maintenance or
off.
A running machine is currently processing an order. An idle machine is available for
processing but is currently without an order to process. The machine is in down
state for scheduled or unscheduled maintenance. The operator is responsible to
change the state.
Each machine has maintenance schedule. Each schedule has a date of last
maintenance and date of next scheduled maintenance.
When the date of next maintenance arrives, the operator sends the machine down
for scheduled maintenance.
Each machine is connected to a failure monitor, which senses hardware failure in
the machine. When the monitor senses a failure, it informs the machine. The
machine changes to the unscheduled maintenance state.
All changes of machine states must be entered in a log. Each entry in the log
includes date and time of the state change, which machine changed state, the
states from and to.
Q.23 A customer decides to upgrade her PC and purchase a DVD player. She begins
by calling the sales department of PC vendor and they tell her to contact customer
support. She than calls customer support and they put her on hold while talking to
engineering. Finally, customer support tells the customer about several supported
DVD options. The customer chooses a DVD and it is shipped by the mail
department. The customer receives the DVD , installs it satisfactorily and then
mails her payment to accounts department. Draw the activity diagram for above
description.
Q.24 A customer decides to upgrade her PC and purchase a DVD player. She
begins by calling the sales department of PC vendor and they tell her to contact
customer support. She than calls customer support and they put her on hold while
talking to engineering. Finally, customer support tells the customer about several
supported DVD options. The customer chooses a DVD and it is shipped by the mail
department. The customer receives the DVD , installs it satisfactorily and then
mails her payment to accounts department. Draw the sequence diagram for above
description.
Q.25 A customer decides to upgrade her PC and purchase a DVD player. She
begins by calling the sales department of PC vendor and they tell her to contact
customer support. She than calls customer support and they put her on hold while
talking to engineering. Finally, customer support tells the customer about several
supported DVD options. The customer chooses a DVD and it is shipped by the mail
department. The customer receives the DVD , installs it satisfactorily and then
mails her payment to accounts department. Draw the collaboration diagram for
above description.

Q.26 The objective of the system is to automate all the activities of the canteen
right from purchasing and to maintaining the kitchen. The system should maintain a
detailed account of all provisions bought and food served at the canteen. Several
inquiry facilities should also be provided to view expenses incurred, planned
menus/cash payment. In short following are the list of facilities which should be
provided with the system: list of items served with rates, daily menu preparation,
daily transactions, availability of information on intranet for reports and inquiries,
purchases and issues.

Draw the use case diagram for above description.


Q.27 The objective of the system is to automate all the activities of the canteen
right from purchasing and to maintaining the kitchen. The system should maintain a
detailed account of all provisions bought and food served at the canteen. Several
inquiry facilities should also be provided to view expenses incurred, planned
menus/cash payment. In short following are the list of facilities which should be
provided with the system: list of items served with rates, daily menu preparation,
daily transactions, availability of information on intranet for reports and inquiries,
purchases and issues.Draw the class diagram based on use case approach for
above description.
Q.28 Consider a book store in a shopping mall. The customer selects the books
from racks to purchase. Prepare a sequence diagram for bookstore checkout
system. The customer brings selected books to cashier. The cashier scans each
item with checkout system to prepare an order. The cashier requests to customer
for payment. The customer gives credit card to cashier. The verifier and checkout
system scans the card. The verifier accepts the card and payment is accepted.
Customer signs the credit card slip. The purchased books are handed over to
customer.
Q.29 Consider a book store in a shopping mall. The customer selects the books
from racks to purchase. Prepare a collaboration diagram for bookstore checkout
system. The customer brings selected books to cashier. The cashier scans each
item with checkout system to prepare an order. The cashier requests to customer
for payment. The customer gives credit card to cashier. The verifier and checkout
system scans the card. The verifier accepts the card and payment is accepted.
Customer signs the credit card slip. The purchased books are handed over to
customer.

Das könnte Ihnen auch gefallen