Vous êtes sur la page 1sur 33

MCA SEM-IV DESs NMITD C1518

UML

INDEX

Sr. Name of Practical Date Sign


No.

1 About Visual Paradigm

2 Use Case Diagram

a. Vending machine

b. Canteen System

c. Order Processing System

3 Activity Diagram

a. Vending machine

b. Restaurant billing

c. Withdrawal of amount from ATM (with


swimlanes)

4 Class Diagram

a. Airline Reservation System

b. Magazine Subscription System (with


association class)

c. Order Processing System

d. Graphical Document Editor

5 Object Diagram

a. Airline Reservation System

b. Magazine Subscription System (with


association class)

6 State Transition Diagram

1|Page
MCA SEM-IV DESs NMITD C1518
UML

a. Vending machine

b. Copy Machine

c. Machine Tacking system

7 Sequence Diagram

a. Vending machine

b. Order Cancellation

c. Book store in shopping Mall

8 Collaboration Diagram

a. Vending machine

b. Order Cancellation

c. Book store in shopping Mall

9 Component Diagram

a. Vending machine

b. ATM machine

10 Deployment Diagram

a. Vending machine

b. ATM machine

c. Order Processing System

11 Case Study

2|Page
MCA SEM-IV DESs NMITD C1518
UML

Practical No.2

USE CASE DIAGRAM

A) Consider vending machine where customer can buy only beverages the stock clerk will load
the items every day, repair technician will perform schedule maintenance after specific intervals.
If some faults identified repair technician will repair the fault. Draw use case diagram for vending
machine.

3|Page
MCA SEM-IV DESs NMITD C1518
UML

B) 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.

4|Page
MCA SEM-IV DESs NMITD C1518
UML

C) Consider order placement process where customer can call telephone agent and place the order.
If the customer is regular customer then order will be placed directly otherwise customer record is
added into the database. To process the order the warehouse clerk will check the stock and order
will be delivered. Customer can call telephone agent to cancel complete order , to cancel particular
order from order.

5|Page
MCA SEM-IV DESs NMITD C1518
UML

Practical No. 3

ACTIVITY DIAGRAM

A) 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 activity diagram for above description.

6|Page
MCA SEM-IV DESs NMITD C1518
UML

B) Consider billing scenario of canteen customer will select menus from menu item. Selected
menu item will be added to bill. If number of person sitting on one table are more than 6 then
tax and service charge are applicable. If number of persons are less than 6 only bill will be
calculated. If customer has coupon, coupon charges will be subtracted from bill and bill will
be transfer to customer.

7|Page
MCA SEM-IV DESs NMITD C1518
UML

C) Consider ATM machine withdraw process where customer will insert card into machine
and pin will be entered. The bank system will authenticate card. If pin is valid customer will
enter amount to withdraw. Bank will check account balance and machine will dispense cash.
The Customer will take money from slot simultaneously amount will be debited from
customers account. ATM machine will display updated balance and card is ejected. Customer
will collect card. Draw activity diagram for above process with swimlanes.

8|Page
MCA SEM-IV DESs NMITD C1518
UML

Practical No.4

CLASS DIAGRAM

A) Consider the air transportation system. Many flights land and depart from citys airport. Some
of the big cities may have more than one airports. 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.

9|Page
MCA SEM-IV DESs NMITD C1518
UML

B) 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.

10 | P a g e
MCA SEM-IV DESs NMITD C1518
UML

C) 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 orders total price method is invoked, the order calls the total price method of each
of items and returns the sum.

11 | P a g e
MCA SEM-IV DESs NMITD C1518
UML

D) 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
objects can be circle, ellipse, rectangles, lines and squares.

12 | P a g e
MCA SEM-IV DESs NMITD C1518
UML

Practical No. 5

OBJECT DIAGRAM

A) 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.

13 | P a g e
MCA SEM-IV DESs NMITD C1518
UML

B) 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.
Consider the person Mr.ABC who has subscribed for magazines Digit and Computer Express.
Mr. ABC has subscribed for both in month of January for six months. Draw object diagram for
above.

14 | P a g e
MCA SEM-IV DESs NMITD C1518
UML

Practical No.6

STATE TRANSITION DIAGRAM

A) 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.

15 | P a g e
MCA SEM-IV DESs NMITD C1518
UML

B) Consider copy machine when user turns it on the machine enters into warning test when
internal testing is done and it display ready light if all ok. When machine is ready to use it
shows ready light ON ( green light ). When user enters number of copies while making xerox
if tray becomes empty then it enters into out of paper state. During making copies if paper jam
occurs then machine will enter into paper jam state till the paper path is cleared. Draw state
transition diagram for copying machine.

16 | P a g e
MCA SEM-IV DESs NMITD C1518
UML

C) 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 sub modes.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 sub modes, 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

17 | P a g e
MCA SEM-IV DESs NMITD C1518
UML

Practical No.7

SEQUENCE DIAGRAM

A) 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.

18 | P a g e
MCA SEM-IV DESs NMITD C1518
UML

B) 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 orders 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.

19 | P a g e
MCA SEM-IV DESs NMITD C1518
UML

C) 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.

20 | P a g e
MCA SEM-IV DESs NMITD C1518
UML

Practical No. 8

COLLABORATION DIAGRAM

A) 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 makes 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 collaboration diagram for above description.

21 | P a g e
MCA SEM-IV DESs NMITD C1518
UML

B) 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 orders 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.

22 | P a g e
MCA SEM-IV DESs NMITD C1518
UML

C) 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.

23 | P a g e
MCA SEM-IV DESs NMITD C1518
UML

Practical No. 9

COMPONENT DIAGRAM

Vending Machine:

24 | P a g e
MCA SEM-IV DESs NMITD C1518
UML

ATM Machine:

25 | P a g e
MCA SEM-IV DESs NMITD C1518
UML

Practical No.10

DEPLOYMENT DIAGRAM

A) Vending Machine:

26 | P a g e
MCA SEM-IV DESs NMITD C1518
UML

B) ATM Machine:

27 | P a g e
MCA SEM-IV DESs NMITD C1518
UML

C) Order Processing System:

28 | P a g e
MCA SEM-IV DESs NMITD C1518
UML

Practical No.11

CASE STUDY

A)USE CASE DIAGRAM:

29 | P a g e
MCA SEM-IV DESs NMITD C1518
UML

B) CLASS DIAGRAM:

30 | P a g e
MCA SEM-IV DESs NMITD C1518
UML

C) SEQUENCE DIAGRAM:

31 | P a g e
MCA SEM-IV DESs NMITD C1518
UML

D) DEPLOYMENT DIAGRAM:

32 | P a g e
MCA SEM-IV DESs NMITD C1518
UML

E) COLLABORATION DIAGRAM:

33 | P a g e

Vous aimerez peut-être aussi