Professional Documents
Culture Documents
Uml Lab Manual
Uml Lab Manual
Uml Lab Manual
1) ATM System : Aim: To model the ATM System in UML Contents: Class diagram Use case diagram Sequence diagram Activity diagram Collaboration diagram Component diagram Deployment diagram
Class diagram: A class diagram shows a relation among set of classes, interfaces, collaborations and their relationships. Class diagram includes active class and is static process view of a system.
client
name account address insert card() enter amount() take cash()
Account
account type account no
card reader
card no read no() check()
Atm screen
show options() invalid()
Cash dispenser
cash count & dispense cash()
Use case diagram: A use case diagram shows set of use cases and actions & their relations. They address static view of the system.
insert card
enter pin no
user
perform transacton
Atm machine
allow to process
Database
take card
Sequence diagram: A sequence diagram is an interaction diagram that emphasizes time ordering of messages. These address the dynamic view.
user 1:
Database
2: allow pin no 3 times 3: check pin no 4: allow to process 5: select account type 6: perform transaction 7: update in db 8: give receipt 9: collect card
Activity diagram: An activity diagram is a special kind of state machine diagram that shows the flow of one activity to another activity within a system.
insert card
enter pin no
invalid pin no No allow to process select account type perform transaction update in db
give receipt
collect card
Collaboration diagram: A collaboration diagram is an interaction diagram that emphasizes the structural organization of objects that send and receive messages.
user
1: insert card 5: select acc type 6: perform transaction 9: take card 8: give receipt
2: allow 3 times
Atm machine
Databas e
Component diagram: A component diagram shows the organization and dependency among a set of components. It addresses the static implementation view of the system. user account
cash dispenser
card reader
Atm screen
Deployment diagram: A deployment diagram shows the configuration of runtime processing odes that lie on them. It addresses static deployment view of architecture related to component diagrams in which a node typically encloses one or more components.
databa se
Atm server
printer
user1
user2
Conclusion: All the UML diagrams of an ATM System are designed and code generated successfully.
2) Retail System project: Aim: To model a retail system Class diagram: The class diagram consists of five classes and relationships of association, dependency and aggregation. The five classes are shop keeper, shop, customer, Assistant and product.
owner
keys cash book give salary() give receipt() collect money()
shop
racks open() close()
user
cash credit card buy() return()
asst
id salary give details()
product
cost barcode
Use case diagram: The use case diagram shows seven use cases and three actors customer, shopkeeper and assistant. Association relationships have been given between actors and corresponding use cases.
give bill
shop keeper
return
give salary
Sequence diagram: The sequence diagram shows three objects. The operation being done here is purchasal.There is eight messages in the sequence diagram.
10
shop keeper
Assistant
2: 3: show
4: give details carry product 5: in trolley pay money give receipt 7: carry product to home
6:
8:
11
Activity Diagram: The activity diagram shows seven activities to buy products in shop.
give details
collect receipt
Collaboration diagram: The collaboration diagram is the isomorphs of the sequence diagram having eight messages and three objects. The objects are shop keeper, customer and assistant.
12
custome r
order to show 2:
Component diagram: The component diagram has five components & only dependency relation is specified. shop
shop keeper
customer
assistant
product
Deployment diagram: There are five nodes in the deployment diagram. The assistant and customer nodes are connected to shopkeeper.
13
products database
shop keeper
recipt printer
Conclusion: All UML diagrams are designed and code generated successfully.
14
3) Railway Reservation : Aim: To model a railway reservation system. Class diagram: The class diagram has four classes that are passenger, railway employee, ticket dispenser and database.Also, the relations involved are association and dependency. passen
name money select option() req form() fill form() receive()
r emp
emp id trains db verify form() issue ticket() update db()
ticket dispenser
blank tickets print()
database
train list vacancy update()
Use case diagram: The use case diagram consists of two actors that are railway employee and passenger. Each have four four corresponding use cases to a total of eight use cases.
15
request form
fill form
submit
check db
update db
pay money
issue ticket
Sequence diagram: The sequence diagram shows four objects that are passenger, railway emp, database and ticket dispenser. Eleven messages are sent for the reservation process to complete.
16
rail emp
database
ticket dispenser
fill form 4: submit 5: verify 6: 7: check db update db 8: calculate fare 9: print 10: pay money
Activity diagram: The activity diagram has ten activities and one decision .The decision is that whether a vacancy is there or not.
17
submit
verify
check db
calculate fare
pay money
issue ticket
Collaboration diagram: The collaboration diagram is the isomorphs of sequence diagram. This uses four objects and ten messages are used. 18
fill form 3: req form 1: 4:submit pay money 10: passeng er provide form 2: 11:
rail emp
issue ticket
Component diagram: The component diagram has four components .Only dependency relationship is used. passeng er rail emp
databas e
ticket dispenser
Deployment diagram: The deployment diagram shows four nodes that are devices, database, railway employee and ticket dispenser.
19
db
rail emp
passenger
ticket dispenser
Conclusion: All UML diagrams are designed and code is generated successfully.
20
4) Hospital management : Aim: To model a hospital system. Class diagram: The class diagram has three classes patient, attender and doctor.Also, dependency and relationships are used. patien
disease money take appoint() buy medici()
attend
tokens give token() allow patient() take fee()
docto
course diagnose() check() give pres()
Use case diagram: The use case diagram has three actors and eight use cases.
21
check
diagnosis
doctor
give pescription
Sequence diagram: The sequence diagram has three objects and nine operations are involved in the diagram.
22
attender
doctor
3: 4: wait
inform
8:
give prescription
9:
23
go to doctor
24
1: take appointment patient collect fee 2: 5: inform go to doctor 6: diagnose give prescription 7: 8: 3: inform
attender
doctor
Component diagram: The component diagram consists of three components and only one dependency exists. patient attender
doctor
Deployment diagram: This diagram consists of four nodes that are database, attender, doctor and patient.
25
database
attender
doctor
patient
Conclusion: All UML diagrams are designed and code is generated successfully.
26
5) Hotel management : Aim: To model a hotel management. Class diagram: The class diagram consists of three classes that are customer, waiter and manager. The relationships are association and dependency. cust
money appetite see menu() order item() eat() pay bill()
wait
notepad show table() give menu() serve() take order() handbill()
manage
cash register change welcome() take bill() give change()
Use case diagram: The use case diagram consists of three actors. It also contains six usecases,two to each actor.
27
give order
clear table
welcome
manager
take bill
Sequence diagram: The sequence diagram consists of three objects and have eight messages passed in this operation.
28
waiter
manager
3:
5:
7: pay money
8: collect change
Activity diagram: The activity diagram consists of ten activities and one decision. The decision is of whether or not to leave the hotel.
29
select item
place order
eat
pay money
Collaboration diagram: The collaboration diagram consists of three objects. It is the isomorphs of the sequence diagram.
30
3: select item 5: eat take manu custome r 2: 4: order item waiter 1: show table 6: give hand bill 7: collect change 8: pay money
manager
Component diagram: The component diagram consists of three components and only dependency used in this.
customer
waiter manager
Deployment diagram: The deployment diagram shows run time processing nodes. In this case, there will be four nodes.
31
database
manager waiter
customer
Conclusion: All UML diagrams are built and code generated successfully.
32
6) Library System : Aim: To model the library system. Class diagram: The library system consists of four classes that are librarian, student, library database and fine. It consists of data relating to all available books. libr ian
student db issue() delete() add() return() collect fine()
stu
stud id pass book issue() return() payfine()
lib db
books add() delete()
fine
fine table enter fine() pending() paid()
33
Use case diagram: The use case diagram shows five sets of operations issue,return,add,delete,fine etc.Each of them have their own operation.
issue
return
student
add
librarian
delete
fine
34
Sequence diagram: The procedure begins with checking id and ends with return of book and library card. student
librarian 1: check id
library db
4:
5:
35
check id
req book
36
2: student 1: 8:
library db
Component diagram: This diagram consists of four components that are library database, librarian, fine and student. The dependency relations are between student and librarian, librarian and library database. lib database librarian
fine
student
Deployment diagram: The deployment diagram consists of seven nodes with three students.
37
fine
studen t db
lib db
librarian
studen t1
studen t2
studen t3
Conclusion: All UML diagrams are built and code is generated successfully.
38