7/30/2019 UML Lab Manual1
1/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
INDEX
S. No Contents Page No
1 Lab Objective 2
2 Introduction About Lab 2-3
3 List of Lab Exercises: Syllabus Programs (JNTU) 4
5 Description about UML 5-7
6 Diagrams 8-33
-1-
7/30/2019 UML Lab Manual1
2/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
LAB OBJECTIVE
Overview of UML
Basic & Advanced Models
Class , Object, Collaboration & Sequence
Use Cases Advanced Modeling
Component Diagram & Deployment Diagrams
INTRODUCTION ABOUT LAB
There are 66 systems (Compaq Presario) installed in this Lab. Their configurations are as follows:
Processor : AMD Athelon 1.67 GH z
RAM : 256 MB
Hard Disk : 40 GB
Mouse : Optical Mouse
Network Interface card : Present
Software
Allsystems are configured in DUAL BOOT mode i.e., Students can boot fromWindows XP or Linux as per their lab requirement.
This is very useful for students because they are familiar with different OperatingSystems so that they can execute their programs in different programmingenvironments.
Each student has a separate login for database access
Oracle 9i client version is installed in all systems. On the server, account for eachstudent has been created.
-2-
7/30/2019 UML Lab Manual1
3/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
This is very useful because students can save their work ( scenarios, pl/sql programs, data related projects ,etc) in their own accounts. Each student work is safe andsecure from other students.
Latest Technologies like DOT NET and J2EE are installed in some systems. Before
submitting their final project, they can start doing mini project from 2nd
year onwards.
MASM ( Macro Assembler ) is installed in all the systems
Students can execute their assembly language programs using MASM. MASM isvery useful students because when they execute their programs they can seecontents of Processor Registers and how each instruction is being executed in theCPU .
Rational Rose Software is installed in some systems
Using this software, students can depict UML diagrams of their projects.
Softwares installed: C, C++, JDK1.5, MASM, OFFICE-XP, J2EE and DOT NET,Rational Rose.
Systems are provided for students in the 1:1 ratio.
Systems are assigned numbers and same system is allotted for students whenthey do the lab.
-3-
7/30/2019 UML Lab Manual1
4/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
UML Syllabus Programs (JNTU)
S. No ProgramsI. ATM DIAGRAMS
1. Class dia gram for ATM.2. Use case diagram for ATM.3. Sequence diagram ATM4. Collaboration diagram for ATM5. Activity diagram for ATM6. State Transition diagram for ATM7. Component diagram for ATM8. Deployment diagram for ATM
II. LMS DIAGRAMS9. Class diagram for LMS.
10. Use case diagram for LMS.11. Sequence diagram LMS12. Collaboration diagram for LMS
13. Activity diagram for LMS14. State Transition diagram for LMS15. Component diagram for LMS16. Deployment diagram for LMS
-4-
7/30/2019 UML Lab Manual1
5/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
Description about UML
1. Model A model is a simplification of reality. A model provides the blueprints of a system. A model may be structural, emphasizing the organization of the system, or it
may be behavioral, emphasizing the dynamics of the system. We build models so that we can better understand the system we are
developing. We build models of complex systems because we cannot comprehend such a
system in its entirety .
Through modeling, we achieve four aims.
Models help us to visualize a system as it is or as we want it to be. Models permit us to specify the structure or behavior of a system. Models give us a template that guides us in constructing as system. Models document the decisions we have made
2. Principles of Modeling
The choice of what models to create has a profound influence on how a problem is attacked and how a solution is shaped
Every model may be expressed at different levels of precision The best models are connected to reality
No single model is sufficient. Every nontrivial system is best approachedthrough a small set of nearly independent models
3. Unified Modeling Language (UML)
The UML is a language for
Visualizing Specifying Constructing Documenting
-5-
7/30/2019 UML Lab Manual1
6/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
The UML is a Language
A modeling language is a language whose vocabulary and rules
focus on the conceptual and physical representation of a system
The UML is a Language for Visualizing
Some programmers think of an implementation and then code it.Some programmers think mentally i.e. they even sketch out a fewideas on a paper. That means some things are best modeledtextually, others are best modeled graphically. The UML is such agraphical language.
The UML is a Language for Specifying
Specifying means building models. It specifies of all theimportant analysis, design, and implementation decisions that must
be made in developing a software project.
The UML is a Language for constructing
The UML is not a visual programming language, but its modelscan be directly connected to a variety of a programming language.This means that it is possible to map from a model in the UML toa programming language such as Java, C++.
The UML is a Language for Documenting
A Healthy software organization produces all sorts of artifacts inaddition to raw executable code. These artifacts include
1. Requirements2. Architecture3. Design4. Source code5. Project plans6. Tests
7. Releases The UML addresses the documentation of a systems architecture
and all of its detail
-6-
7/30/2019 UML Lab Manual1
7/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
4. Architectural views of UML
The user model view
- Use Case Diagram - The functionality of a system
The structural model view
- Class Diagram - The static structure of a system
- Object Diagram - The static structure of a system at a particular time
The behavioral model view
- Sequence Diagram - Interaction among elements of a system in a time sequence
- Collaboration diagram - Interaction among elements and their relations organizedin time and space
- State Diagram - The status condition and responses of the elements of a system
- Activity Diagram - The activities of the system
The implementation model view
- Component Diagram - The organization of the elements realizing the system
The Environment model view
- Deployment diagram - Configuration of environment elements and the mapping of elements realizing the system into them
-7-
7/30/2019 UML Lab Manual1
8/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
ATM CLASS DIAGRAM
A T M i n t e r fa c e
+ b r a n c h n a m e : S t rin g+ b r a n c h : S tr in g+ lo c a t io n : S tr in g
+ a c c e p t c a r d ( )+ a c c e p t p in ( )+ p r o v id e t ra n s a c t io n ( )+ r e t u r n ( )+ e j e c t c a r d ( )
C a r d
+ c a r d n o : in t
+ is s u e d a t e : S tr in g+ e x p ir y d a t e : S tr in g+ b a n k n a m e : S t r in g
+ c a r d s ( )
C a r d R e a d e r
+ a c c e p t c a r d ( )+ v e r if y c a r d ( )+ c a r d r e a d e r ( )
w i th d r a w m a n a g e m e
< < d a t a a c c e s s > >
+ u p d a t e b a l a n c e ( )
T r a n s a c t i o n
B a n k S e r v e r
+ b a n k n a m e : S tr in g+ lo c a t io n : S tr in g+ p o r t n u m b e r : in t
+ v e r if y p i n ( )+ v a lid a t e p i n ( )+ v e r if y a m t ()+ s u f f ic i e n t a m t ()
C a s h+ c u r r e n c y t y p e : S t rin g+ C u r re n c y n a m e : S t rin g
A T M C o n t r o l l e r
+ s u b m it p in ( )+ v e r if y p i n ( )+ a c c e p t am t ( )
C u s t o m e r N a m e :S t r in gA d d r e s s : S t r i n gc a r d n o : in t b a n k n a m e :S t r in g b r a n c h n a m e :S t r in g p in n o :in ta c c t n o : in t
-8-
7/30/2019 UML Lab Manual1
9/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
ATM USE-CASE DIAGRAM
< < e x t e n d > >
< < e x t e n d > >
< < e x t e n d > >
< < e x t e n d > >
< < e x t e n d > >
< < e x t e n d > >
< < e x t e n d > >
< < e x t e n d > >
< < i n c l u d e > >
< < i n c l u d e > >
-9-
7/30/2019 UML Lab Manual1
10/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
ATM SEQUENCE DIAGRAM
-10-
7/30/2019 UML Lab Manual1
11/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
user ATM interface card card reader ATM controller Bank Server cash
1 : Enter ATM()
2 : insert card()
3 : accept card()4 : Read card()
5 : Verify card()
6 : return()7 : Enter PIN()
8 : accept PIN()
9 : Verify PIN()
10 : Validate PIN()
11 : Validate()
12 : Display Transaction()
13 : Select Transaction withdraw()
14 : prompt for enter amount()
15 : Enter amount()
16 : Accept amount()
17 : Verify bal()
18 : Check amount()
19 : Generate amount()
20 : Produce amount()
21 : Update balance()
22 : Collect cash()
23 : Produce receipt()
24 : Collect Receipt()
25 : Eject card()
26 : Collect card()
-11-
7/30/2019 UML Lab Manual1
12/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
ATM COLLABORATION DIAGRAM
user
AT M inte rfa ce
card
card reader
AT M contr olle r Bank Servercash
1 : Enter ATM()
2 : insert card()
3 : accept card()
4 : Read card()
5 : Verify card()
6 : re turn()
7 : Enter PIN()
8 : accept PIN()
9 : Verify PIN()
10 : Validate PIN()
11 : Validate()
12 : Display Tr ansaction()
13 : Se lect Transaction withdraw() 14 : prom pt for enter amount()
15 : Enter a mount( )
16 : Acce pt amount()
17 : V erify bal()
18 : Check am ount()19 : Generate am ount()
20 : Produce am ount()21 : Update balance()
22 : C ollect cash()
23 : Produce re ceipt()
24 : Collect Receipt()
25 : Eject card()
26 : C ollect card()
-12-
7/30/2019 UML Lab Manual1
13/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
ATM STATE-CHART DIAGRAM
idle
M a i n t e n a n c e
ma i n t a i n
A cti ve
P ro c e s s i n g
Prin t ing
S e l e c t i n g
V a lid a tin g
[Con t inue ][no t con t inue]
c a n c e l
c a rd i n s e r t e d
t rans i tion from subs ta te
e n t ry /r e a d c a rdex i t/ e jec t ca rd
-13-
7/30/2019 UML Lab Manual1
14/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
ATM ACTIVITY DIAGRAM
-14-
7/30/2019 UML Lab Manual1
15/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
Display screen
Acceptcard
AcceptPIN
Verify PIN
DisplayTransaction
changePIN Withdraw Transfer MiniStatement
AcceptTransaction
ProcessTransaction
EjectCard
onVerify()
[invalidPIN]
[validPIN]
on Display()
onAccept(Transaction)
-15-
7/30/2019 UML Lab Manual1
16/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
ATM COMPONENT DIAGRAM
withdraw
TransferMoney
Ministatement
Change PIn
ATM
-16-
7/30/2019 UML Lab Manual1
17/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
ATM DEPLOYMENT DIAGRAM
WAN
-17-
7/30/2019 UML Lab Manual1
18/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
LMS USE-CASE DIAGRAM
-18-
7/30/2019 UML Lab Manual1
19/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
-19-
7/30/2019 UML Lab Manual1
20/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
LMS CLASS DIAGRAM
+name : S tr ing+id: integer+branch: String+address: String
+change de tails()+access library()
+designation: S tring+Qualification: String
+access catalog()+issue item()+renew item()+acknowledgement()+calculate fine()+display item info()+display login pag e()+display homepage()
+login()
+name: String+id: integer+author: S tring+version: S tring+type: S tring
+set details()+get details() +calculate fine()
+name: Str ing+empid: String
+requestforissue(): void
+requestforrenew(): void+requestforreturn(): void+giveacknowledgement(): void
+usernam e: S tr ing+passw ord: S tr ing
+request de tails()+validate user ()+update()+get item info()
+deny user()
-20-
7/30/2019 UML Lab Manual1
21/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
LMS SEQUENCE DIAGRAM
USER LBSYS DBA
1 : request uname & password()
2 : access library()
3 : prov ide uname & pwd()
4 : validate user()
5 : replay()
6 : display home page()
7 : get item info()
8 : prov ide item details()
9 : display item info()
10 : replay()
-21-
7/30/2019 UML Lab Manual1
22/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
-22-
7/30/2019 UML Lab Manual1
23/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
LIBRA RIA N BO O KDA TEFO RMBO O KD E TA I LS BO O KD ATA CO N T RO LLE R D ATA M A N A G EM ENT
11 : add new book()
12 : request book details()
13 : v erify id()
14 : save book()
15 : ente r book details()
16 : save()
17 : create()
18 : generate ne w id()
19 : sav e boo k details()
20 : as sign new id()
21 : ne w id()
22 : a ssign id()
-23-
7/30/2019 UML Lab Manual1
24/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
USER LIB SYSDBA LIBRARIAN
23 : access cata log()
24 : request for issue()
25 : login()
26 : issueItem()
27 : update()
28 : acknowledgement()
29 : gives acknowledgement()
-24-
7/30/2019 UML Lab Manual1
25/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
USER LIB SYS DBA LIBRARIAN
30 : access catalog()
31 : request for renewal()
32 : login()
33 : renewal item()
34 : update()
35 : acknowledgement()
36 : gives acknowledgement()
-25-
7/30/2019 UML Lab Manual1
26/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
USER LIB SYS DBA LIBRARIAN
37 : access catalog()
38 : request for return()
39 : login()
40 : re turn item()
41 : update()
42 : acknowledgement()
43 : gives acknowledgement()
-26-
7/30/2019 UML Lab Manual1
27/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
-27-
7/30/2019 UML Lab Manual1
28/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
U s e r
L IB S y s
D B A
L i b r a r i a n
B o o k d a t e fo r m
B o o k d e t a i lsB o o k d a t a c o n t r o l le r
D a ta M a n a g e m e n t
1 : R e q u e s t U s e r n a m e a n d p w d ( )
2 : A c c e s s L ib r a r y ( )
3 : P r o v id e U s e r n a m e a n d p w d ( )
4 : V a l id a te U s e r ( )
5 : R e p l a y ( )
6 : D is p la y H o m e P a g e ( )
7 : g e t I te m in f o ( )
8 : p r o v i d e i te m d e ta i ls ( )
9 : d is p l a y i te m in f o ( )
1 0 : re p l a y ( )
1 1 : A d d n e w b o o k ( )
1 2 : R e q u e s t b o o k d e t a il s ( )
1 3 : V e r i fy ID ( )
1 4 : S a v e b o o k ( )
1 5 : E n te r B o o k d e ta i ls ( )
1 6 : S a v e ( )
1 7 : C r e a t e ( )
1 8 : G e n e r a te n e w id ( )
19 : S a v e b o o k d e t a il s ( )
2 0 : a s s ig n n e w id (
2 1 : n e w id ( )
2 2 : A s s ig n i d ( )
-28-
7/30/2019 UML Lab Manual1
29/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
U s e r
L i b S y s
D B A
L i b r a r i a n
U s e r
L i b s y s
D B A
L i b r a r i a n
U s e r
L i b S y s
D B A
L i b r a r i a n1 : a c c e s s c a ta l o g ( )
2 : r e q u e s t fo r r e tu r n ( )
3 : lo g i n ( )
4 : i s s u e i te m ( )
5 : u p d a t e ( )
6 : a c k n o w le d g e m e n t ( )
7 : g i v e a c k n o w le d g e m e n t ( )
8 : a c c e s s c a ta l o g ( )
9 : a c c e ss f o r r e t u r n ( )
1 0 : lo g in ( )
1 1 : r e n e w i t e m ( )
1 2 : u p d a t e ( )
1 3 : ac k n o w l e d g e m e n t ( )
1 4 : g i v e a c k n o w le d g e m e n t ( )
1 5 : a c c e s s c
1 6 : a c c e s s f o r r e tu r n ( )
1 7 : l o g in ( )
1 8 : r e t u r n i te m ( )
1 9 : u p d a t e (
2 0 : a c k n o w l e d g e m
2 1 :g i v e a c k n o w l e
LMS COLLABORATION DIAGRAM
-29-
7/30/2019 UML Lab Manual1
30/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
LMS ACTIVITY DIAGRAM
US ER AS S T LIBRARIAN S YS T EM
Enter
Show Id card
Select Option
Ver ify id ca rd
Provide Options
Borrow purchase renew return
-30-
7/30/2019 UML Lab Manual1
31/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
U S E R A S S T L IB R A R IA N S Y S T E M
E n t e r
S h o w id c a r d
S e l e c t r e t u r n
p a y f in e
v e r i fy id c a r d
p r o v i d e o p t io n s
c h e c k d a t a f o r l a s t is s u e
r e n e w b o o k
n o t v a l id
v a l i d
y e s
n ou p d a t e in f o r m a t io
-31-
7/30/2019 UML Lab Manual1
32/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
U S E R A S S T L IB R A R IA N S Y S T E M
E n t e r
S h o w id c a r d
S e le c t r e t u r n
P a y f in e
ve r i fy id
p r o v id e o p t io n s
c h e c k d a ta f o r s u b m is s i o n
r e t u r n b o o k
u p d a te i n fo r m a t i
n o t v a l id
va l id
y e s
n o
-32-
7/30/2019 UML Lab Manual1
33/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
u s e r A s s t L ib r a r i a n S y s t e m B o o k S h e l f
E n t e r
s h o w id c a r d
s e l e c t b o r r o w
v e r i f y id c a r d
c h e c k l im i te d n o o f b o o k s
c a n c e l b o o k s
i s s u e b o o k s
p r o v i d e o p t io n
U p d a t e In f o r m a t io n
S e a r c h b o o k s
y e s
n o t v a l id
v a l i d
n o
-33-
7/30/2019 UML Lab Manual1
34/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
u s e r A s s t L ib r a r ia n S y s t e m B o o k S h e l f
E n t e r
s h o w id c a rd
s e le c t b o r r o w
v e r if y id c a r d
c h e c k lim it e d n o o f b o o k s
c a n c e l b o o k s
is s u e b o o k s
p r o v i d e o p t i o n
U p d a t e I n f o rm a t io n
S e a r c h b o o k
y e s
n o t v a lid
v a lid
n o
-34-
7/30/2019 UML Lab Manual1
35/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
LMS STATE-CHART DIAGRAM
S t a t e 1
p r o v i d e s e r v i c e
v e r i f y s e r v i c ep r o c e s s s e r v i ce
u p d a t e s e r v ic e
log in
v e r i f y i d n o v a l i d u s e r p r o v id e s e r v i c e
s e l e c t io n s e r v i c e
[ a v a i l a b l e ]
o n v e r i f y
o n s e r v i c e
m a i n t e n a n c e
-35-
7/30/2019 UML Lab Manual1
36/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
LMS COMPONENT DIAGRAM
-36-
7/30/2019 UML Lab Manual1
37/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
issue book Library mgmt system
order book Update catalog
-37-
7/30/2019 UML Lab Manual1
38/38
CMRIT (MCA IIIYr) OOAD(using UML) _____________________________________________________________________________
LMS DEPLOYMENT DIAGRAM