Introduction to Unifed

Modeling Language
©NIIT Introduction to Unified Modeling Language 1
2 Introduction to Unified Modeling Language ©NIIT
RATIONALE
Why This Module
The Unified Modeling Language module is positioned as the entry point to the Java module. UML is a
visual modeling language used for visualiing! specifying! constructing! and documenting various
aspects of soft"are systems and is emerging strongly as a "orld"ide industry standard.
This module has #een incorporated purely #ecause of inputs #y $ro%ect Managers "ho have #een
involved in large&scale pro%ects involving o#%ect&oriented languages such as Java. It is strongly
recommended that students should #e e'posed to design and modeling concepts prior to their learning
languages such as Java. The $ro%ect Managers have e'pressed a vie" that the students should #e taught
a design concept #efore they start creating applications for actual pro%ects. (esign! as per the industry! is
a )ey to the success of such pro%ects.
This module is termed *Introduction to Unified Modeling Language+ as the treatment is #rief and aimed
at getting across information related to modeling! design! UML notations! ,(L- concepts! and typical
applications.
.arious comments #y a $ro%ect Manager! "ho "as involved in giving us design inputs for the module!
after seeing the UML course"are! are/
“I wish we had this for our earlier project”
& referring to the a#sence of a streamlined course during the previous pro%ect he had done using UML
standards.
“Can be also used in Client-Server projects”
& referring to the usa#ility of UML in pro%ects! "hich use methodologies other than o#%ect&orientation.
“I think you are covering everything I can think of, in terms of introduction to concepts
and notations”
& referring to the range of )no"ledge imparted using the UML course"are.
“I can see, that students who have done this course will be better off than eperienced
people, as far as their ability to appreciate the importance of design is concerned”
& referring to the preparedness of students after going through the UML course in comparison "ith the
e'perienced people.
“!ill be able to understand documentation of eisting systems, manuals, and tool based
outputs”
& referring to the capa#ility of students after finishing the UML module.
“Can take-off from this point”
& referring to the capa#ility of the student to start using soft"are tools #ased on UML .
©NIIT Introduction to Unified Modeling Language 0
Linkage with Jaa
UML is most suited to support pro%ects involving the use of o#%ect&oriented languages li)e Java and -1
1. The student is introduced to 2#%ect&2riented 3nalysis and (esign 4223(5 and ,oft"are
(evelopment Life -ycle 4,(L-5 concepts! follo"ed #y UML notations and diagrams.
In the Java module! the student "ill #e re6uired to conform to UML standards! "herever applica#le
4typically in class diagrams! and the depiction of attri#utes and #ehaviors5.
7 Introduction to Unified Modeling Language ©NIIT
O!JE"TI#E$
The o#%ective of this module is to familiarie students "ith #asic UML notations and diagrams used to
depict soft"are systems.
,ince students are not e'pected to have any e'posure to system analysis and design! the module starts
from the very #asics and introduces the students to ,(L- and o#%ect&oriented design concepts.
The overall o#%ective of the module is to ensure that students should understand the design criticality of
o#%ect&oriented soft"are development. 3lso! since a unified standard has emerged "orld"ide! the
students need to get introduced to it right a"ay.
©NIIT Introduction to Unified Modeling Language 8
ENTR% &RO'ILE
3 student "ho registers for the UML module/
 ,hould #e clear a#out soft"are development as the chosen career option.
 ,hould #e a#le to interact in 9nglish. The classes "ill #e conducted in 9nglish. The course"are is
"ritten in 9nglish. The sessions "ill #e interactive in nature.
 ,hould have an idea a#out o#%ect&oriented concepts.
: Introduction to Unified Modeling Language ©NIIT
E(IT &RO'ILE
3t the end of this module! the students should #e a#le to/
 Identify various UML notations and diagrams and their applications in o#%ect&oriented design.
 3pply )no"ledge ac6uired to depict various vie"s of a system.
 Use UML notations for/
• 3ctors
• Use cases
• Use case diagrams
• -lasses and o#%ects
• -lass diagrams
• -olla#oration diagrams
• ,tatechart diagrams
• -omponents
• -omponent diagrams
• Nodes
• (eployment diagrams
 3pply industry standards for depicting o#%ect&oriented design.
©NIIT Introduction to Unified Modeling Language ;
'A)
< 1. =hat is the necessity for teaching UML>
3 1. UML or Unified Modeling Language has emerged as the de facto industry standard for o#%ect&
oriented analysis and design. Many organiations all over the "orld have started using UML in
their analysis and design phases of soft"are development. In our intervie"s "ith the pro%ect
managers at the soft"are factories! "e "ere informed that an early e'posure to UML notations is
#eneficial for developers. Therefore! "e have introduced UML as part of this semester.
< 2. =hat is the o#%ective of the UML module>
3 2. The main o#%ective of this module is to familiarie a student "ith the standards and notations of
UML. The student should #e a#le to understand the diagrams used for depicting various vie"s of
the system.
< 0. =hy UML in the first semester>
3 0. Industry e'perts suggested that students should #e introduced to o#%ect&oriented design #efore
#eginning to code in an o#%ect&oriented language. Therefore! UML "as introduced #efore Java.
? Introduction to Unified Modeling Language ©NIIT
NOTE 'OR 'A"ULT%
,ince UML is a conceptual module! it is li)ely that the students "ill focus less on this module as
compared to other modules li)e 22$, and Java.
3lthough the analysis and design activities are assigned to more e'perienced mem#ers of a soft"are
development team! an entry&level developer needs to understand the functional specification and other
documents created in the analysis and design phases. These documents use UML notations to represent
the process under study.
©NIIT Introduction to Unified Modeling Language @
LE$$ON $&E"I'I" IN&UT$
Lesson *A
E+a,-les and Analogies
Let us ta)e the e'ample of a soft"are pac)age to #e developed for the $urchase (epartment of a Aive&
star hotel. The Beneral Manager of the hotel notices the follo"ing pro#lems/ stoc) register not updated!
order placed for goods availa#le in stores! and stoc) re6uired not availa#le on time. This "as leading to
customer dissatisfaction. Therefore! he decides to computerie the $urchase (epartment.
The functioning of the $urchase (epartment is as follo"s/
=henever there is a re6uirement of items! the store)eeper sends a re6uisition specifying the items
re6uired and their 6uantities to the $urchase (epartment. Cased on this! the $urchase (epartment
identifies suita#le suppliers and places a purchase order "ith them. The supplier supplies the re6uested
items. The supply of the items is al"ays fulfilled in a single transaction and not in installments. =hen
the goods arrive! the $urchase (epartment passes it on to the store)eeper.
Actors
,tore)eeper
$urchasing cler)
,upplier
Use Cases
Deceive item re6uests
$lace order
Deceive ordered items
Issue re6uested items
1E Introduction to Unified Modeling Language ©NIIT
The Use Case Diagram
'A)
<.1 =hy is the data store not sho"n in a use case diagram>
3.1 The use case diagram descri#es the functionality of the system as the end user sees it. The customer
or the end user can only see the functionality of the system! not the "ay the data is stored.
<.2 3re use cases num#ered>
3.2 No! use cases are not num#ered.
<.0 Is there any other language similar to UML>
3.0 UML is the result of a unified effort #y the authors of three o#%ect&oriented modeling methods.
These methods are/
 Cooch method #y Brady Cooch
 22,9 42#%ect&2riented ,oft"are 9ngineering5 #y Ivar Jaco#son
 2MT 42#%ect Modeling Techni6ue5 #y James Dum#augh
<.7 =here is UML used>
©NIIT Introduction to Unified Modeling Language 11
,upply ordered
items
$urchasing
cler)
,upplier
Issue re6uested
items
,tore)eeper
$urchasing
cler)
,tore)eeper
,end item
re6uests
$urchasing
cler)
,upplier
$lace order
$urchasing
cler)
3.7 UML is used for modeling systems ranging from enterprise information systems to distri#uted
=e#&#ased applications to real&time em#edded systems. In addition! it is used as a part of the
soft"are development process.
<.8 3re there any other terminologies used for various vie"s in UML>
3.8 Terminologies Used/
 The User vie" is also referred to as the Use case vie"
 The ,tructural vie" is also referred to as the (esign vie"
 The Cehavioral vie" is also referred to as the $rocess vie"
 The 9nvironment vie" is also referred to as the (eployment vie"
<.: Is an actor part of the system>
3.: 3ctors are e'ternal entities that interact "ith the system directly. They either provide input or
receive some output from the system.
Additional In-uts
It is strongly recommended that the faculty study the site """.omg.org and
http/FF""".rational.comFuml in order to increase their )no"ledge of the topics covered in this lesson.
This "ill help in ensuring technical accuracy "hile discussing concepts in class. In addition! note that
UML is very specific a#out notations! conventions etc.! and all these are clearly documented as part of
the content availa#le on the a#ove&mentioned sites.
The user vie" helps the analyst and the designer to vie" the system as perceived #y the user of the
system. In this vie"! only those high&level functionalities or processes of the system #eing developed
should #e depicted! "hich the user can immediately relate to.
=hile identifying actors! "e have to as) the follo"ing 6uestions to confirm "hether or not the entity
identified is really an actor.
 (oes the entity directly interact "ith the system in consideration! either #y providing input or #y
receiving direct output>
 (oes it e'ist in real life>
 Is it outside the #oundaries of the system>
Aor a particular entity! if the ans"er to all the a#ove 6uestions is *G9,+! then that entity can #e an actor.
If the ans"er to even one of them is *N2+! then that entity is not an actor.
=henever you identify an actor! it typically maps to a noun or a pronoun of the high&level user
re6uirement document or pro#lem statement in our conte't.
Use cases are high&level functionalities as visi#le to the user and the user should #e a#le to map those
functionality to the real&life functionality of the system #eing developed.
=henever you identify a use case! it typically maps to a ver# or an action of the high&level user
re6uirements document or the pro#lem statement in our conte't.
3s you o#serve in the CIB picture given in the #oo)! the user vie" is sho"n at the center #ecause the
entire soft"are system is #uilt on the #asis of user re6uirements.
12 Introduction to Unified Modeling Language ©NIIT
,pend time in e'plaining the necessity and importance of various activities that occur in various phases
of ,(L-. 3fter you finish the discussion on ,(L-! introduce UML. The ,(L- concept acts as the
foundation for the entire UML module and for the ne't module i.e. Java. In addition! e'plain the ,(L-
phases descri#ed #y Brady Cooch ! James Dum#augh ! and Ivar Jaco#son.
Ma--ing o. $/L" &hases to UML #iews
View Diagrams Why SDLC Phases
Drawn in Used
User .ie" Use case diagrams To understand user
re6uirements
Inception
and
9la#oration
In all phases of
,(L-
,tructural .ie" -lass diagrams
2#%ect diagrams
To identify the #asic
#uilding #loc)s of the
system H the static
aspect of the system
9la#oration Mainly in the
-onstruction and to a
certain e'tent in the
Transition phases of
,oft"are
(evelopment
Cehavioral
.ie"
-olla#oration
diagrams
,e6uence
diagrams
,tatechart
diagrams
3ctivity diagrams
To identify the
#ehavior of the
system in various
circumstances and
conditions H the
dynamic aspect of the
system
9la#oration Mainly in the
-onstruction and to a
certain e'tent in the
Transition phase of
,oft"are
(evelopment
Implementation
.ie"
-omponent
diagrams
To )no" ho" various
structural #loc)s
identified in the
structural vie" can #e
grouped and
pac)aged
9la#oration Mainly in $ac)aging
and Integration and to
a certain e'tent in the
-onstruction and
Transition phases
9nvironment
.ie"
(eployment
diagrams
To )no" a#out the
physical and
deployment aspects
of the system
9la#oration Mainly in $ac)aging
and Integration and to
a certain e'tent in the
-onstruction and
Transition phases
©NIIT Introduction to Unified Modeling Language 10
$olutions0 1uided &ractice
&ractice *0 Identi.ying the Actors Interacting with the $yste,
The Actors
DID4.5/ Degional ID Iead of the region "here a vacancy e'ists
DID425/ 2ther Degional ID Ieads
9M$/ 9mployees of the Te#isco company
-andidates/ The -andidates referred #y the employees
9mployees are not differentiated into 9M$4.5 and 9M$425! as their role is the same across regions in
this use case diagram.
17 Introduction to Unified Modeling Language ©NIIT
&ractice 20 /esign a User #iew o. a $yste,
Use Case Diagram
Additional E+ercises .or $tudents
1. 2f all the channels used for recruiting personnel! ne"spaper advertisements generate the largest
volume of responses. =henever a vacancy arises in a region of Te#isco! the regional ID
department for"ards the re6uirement details to Iead 2ffice. The ID department at the Iead 2ffice
places an advertisement in leading ne"spapers inviting applications. The advertisement contains
details a#out the vacancy! the last date of application! and the ID contact person to "hom the
applications have to #e addressed.
The candidates send in their applications to the contact person at the Iead 2ffice. The s)ills of the
applicants are then matched "ith the s)ills re6uired for the vacancy. The candidates "ho possess
the re6uired s)ills are short&listed and an intervie" schedule is dra"n up. The short&listed
candidates are then informed a#out the intervie" schedule.
©NIIT Introduction to Unified Modeling Language 18
,upervisor
,end Leave
3pplication
9M$
,anctionFDe%ect
3pplication
,upervisor
.erifies the
Leave Calance
ID425
Update Leave
(etails
ID425
,ends the
approval
9M$
Cased on intervie" proceedings! the intervie" details are updated and all the selected candidates
are given an offer letter. The applicant informs the ID department at Iead 2ffice! either #y
accepting the offer or declining the offer letter. 2n acceptance of the offer letter! the Iead 2ffice
ID department updates the regional ID department a#out the employee details.
Identify the actors and use cases and dra" the use case diagram.
2. Decruitment agencies are typically used to recruit candidates for top managerial positions and other
positions that are difficult to fill. The ID department at Te#isco Iead 2ffice sends vacancy details
to its recruiting agencies. They identify suita#le candidates and send the details #ac) to the ID.
The s)ills of the applicants are then matched "ith the s)ills re6uired for the vacancy. The
candidates "ho possess the re6uired s)ills are short&listed and an intervie" schedule is dra"n up.
The short&listed candidates are then informed a#out the intervie" schedule.
Cased on the intervie" proceedings! the intervie" details are updated and all selected candidates
are given an offer letter. The applicant informs the ID department at Iead 2ffice! either #y
accepting the offer or declining the offer letter. 2n acceptance of the offer letter! the ID department
at Iead 2ffice updates the recruiting agency and pays a percentage of the employee+s annual salary
as recruitment fees.
Identify the actors and use cases and dra" the use case diagram.
1: Introduction to Unified Modeling Language ©NIIT
'A"ULT% O!$ER#ATION$
©NIIT Introduction to Unified Modeling Language 1;
Lesson *!
E+a,-les and Analogies
Defer to the $urchase (epartment case study as discussed in the 9'amples and 3nalogies section of
Lesson1.
Example (JDeceive item re6uestsK use case
Classes
Control Class Entity Class !o"ndary Class
Item De6uest ,ending Manager ,tore)eeper
$urchasing -ler)
Item
Item De6uest
Behaviors and Attributes of classes
Class !eha#iors Attri$"tes
Item De6uest ,ending Manager & processItemDe6uest45
Item & item-ode
& 6uantity
Item De6uest & itemDe6uestNo
& itemDe6uest(ate
& item-ode
,tore)eeper & re6uestAorItem45 & emp-ode
& empName
& date2fJoining
$urchasing -ler) & emp-ode
& empName
1? Introduction to Unified Modeling Language ©NIIT
The Class Diagram
Example (J$lace orderK use case
Classes
Control Class Entity Class !o"ndary Class
$urchase 2rder Manager $urchasing -ler)
,upplier
Item
$urchase 2rder
Behaviors and Attributes of classes
Class !eha#iors Attri$"tes
$urchase 2rder Manager & process$urchase2rder45
Item & item-ode
& 6uantity
$urchase 2rder & purchase2rderNo
& purchase2rder(ate
& item-ode
,upplier & supplier-ode
& supplierName
& supplier3ddress
& supplier$honeNo
& supplierDating
©NIIT Introduction to Unified Modeling Language 1@
%tem &e'"est
itemDe6uestNo
itemDe6uest(ate
item-ode
1..L 1
1 1
%tem
item-ode
6uantity
Store(eeper
emp-ode
empName
date2fJoining
re6uestAorItems45

P"rchase Cler(
emp-ode
empName
%tem &e'"est
&ecei#ing )anager
processItemDe6uest45
1 1 1
1
$urchasing -ler) & place$urchase2rder45 & emp-ode
& empName
The Class Diagram
Example (J,upply ordered itemsK use case
Classes
Control Class Entity Class !o"ndary Class
2rdered Items ,upplying Manager ,upplier
$urchasing -ler)
Item
Invoice
2E Introduction to Unified Modeling Language ©NIIT
P"rchase *rder
purchase2rderNo
purchase2rder(ate
item-ode
1..L 1
1 1
%tem
item-ode
6uantity
P"rchase Cler(
emp-ode
empName
place$urchase2rder45
P"rchase *rder
)anager
process$urchase2rder45
1 1 1
1
S"pplier
supplier-ode
supplierName
supplier3ddress
supplier$honeNo
supplierDating
Behaviors and Attributes of classes
Class !eha#iors Attri$"tes
2rdered Items ,upplying Manager & supplies2rderedItems45
Item & item-ode
& 6uantity
Invoice & invoiceNo
& invoice(ate
& item-ode
,upplier & su#mitInvoice45 & supplier-ode
& supplierName
& supplier3ddress
& supplier$honeNo
& supplierDating
$urchasing -ler) & emp-ode
& empName
The Class Diagram
©NIIT Introduction to Unified Modeling Language 21
%n#oice
invoiceNo
invoice(ate
item-ode
1..L 1
1 1
%tem
item-ode
6uantity
P"rchase Cler(
emp-ode
empName
*rdered %tems
&ecei#ing )anager
receive2rderedItems45
1 1 1
1
S"pplier
supplier-ode
supplierName
supplier3ddress
supplier$honeNo
supplierDating
su#mitInvoice45
Example (JIssue re6uested itemsK use case
Classes
Control Class Entity Class !o"ndary Class
$urchase 2rder Manager $urchasing -ler)
,upplier
Item
$urchase 2rder
Behaviors and Attributes of classes
Class !eha#iors Attri$"tes
De6uested Items Issue Manager & for"ardDe6uestedItems45
Item & item-ode
& 6uantity
Item De6uest & itemDe6uestNo
& itemDe6uest(ate
& item-ode
$urchasing -ler) & issueDe6uestedItems45 & emp-ode
& empName
,tore)eeper & emp-ode
& empName
& date
The Class Diagram
22 Introduction to Unified Modeling Language ©NIIT
%tem &e'"est
itemDe6uestNo
itemDe6uest(ate
item-ode
1..L 1
1 1
%tem
item-ode
6uantity
P"rchase Cler(
emp-ode
empName
issueDe6uestedItems45
&e'"ested %tems %ss"e
)anager
for"ardDe6uestedItems45
1 1 1
1
Store(eeper
emp-ode
empName
'A)
<.1 -an there #e more than one #oundary class>
3.1 Ges.
<.2 Io" do I identify #ehaviors in a class>
3.2 The actions performed #y each class are mapped to the #ehaviors of the class. These actions have to
#e atomic in nature i.e. the actions should not #e dependent on any other class.
<.0 (oes the class diagram represent the ta#le structure>
3.0 -lass diagrams are not meant to represent the ta#le structure. (ata#ase&related decisions are made
in the construction phase.
<.7 -an the same class e'hi#it different attri#utes and #ehavior in different use cases>
3.7 The class diagram is dra"n for a particular use case. Therefore! the same class could e'hi#it
different attri#utes and #ehavior in different use cases. =hile re"or)ing the design documents in
various phases! the related classes are consolidated appropriately to form one #ig class diagram for
the entire soft"are system under consideration.
Additional In-uts
Aaculty should ensure that they have understood the difference #et"een different types of classes.
$olutions0 1uided &ractice
&ractice *0 "reating the "lass /iagra,
&elationship $etween the Classes
9mployee and 3pplication Manager M one to one relationship.
3pplication Manager and Degional ID Iead 4.5 M one or more relationship.
©NIIT Introduction to Unified Modeling Language 20
The Class Diagram
27 Introduction to Unified Modeling Language ©NIIT
Application
)anager
fo"ard3pplication45
9
c
o
d
e
/
3
p
p
l
y

4
5
1..L 1
1 1
Employee
emp-ode
empName
6ualification
date2fJoining
years2f9'perience
send3pplication45
&egional +& +ead
(V
regionName
Application
applicationNo
application(ate
post3ppliedAor
emp-ode
1

1

&ractice 20 "reating the O34ect /iagra,
Additional E+ercises .or $tudents
1. In the internal %o# postings process! the employees send their applications in response to the
vacancy information to the regional ID department "here the vacancy e'ists. The s)ills of the
applicants are then matched "ith the s)ills re6uired for the vacancy. 3pplicants "ho possess the
re6uired s)ills are then short&listed and an intervie" schedule is dra"n up. The short&listed
applicants are then informed a#out the intervie" schedule.
Aollo"ing is the use case diagram for the a#ove scenario in the internal %o# postings process.
A Segment of the Use Case Diagram
Identify various classes! their #ehaviors! and attri#utes! and dra" the class diagram.
©NIIT Introduction to Unified Modeling Language 28
Match ,)ills
3rrange
Intervie"
9M$
DID 4.5
$osition .acant

regionName
No2f.acancy
s)illDe6uired
&egional
+&
+ead (*
regionName
Distri$"tion
)anager
informDegions45
notify9mployees45
9
c
o
d
e
/
3
p
p
l
y

4
5
&egional
+& +ead
(V
regionName
enter.acancy
details45
9mployee
emp-ode/ E,,--.
empName/ /erry
!lac(
(ate2fJoining/
--0-,0-111
Gears2f9'perience/
.
2. In the internal %o# postings process! the regional ID head updates the intervie" details #ased on the
proceedings. The selected applicants are then given a ne" offer letter. The applicant informs the ID
head a#out the region "here the vacancy e'ists either #y accepting or declining the offer letter.
Aollo"ing is the use case diagram for the a#ove scenario in the internal %o# postings process.
A Segment of the Use Case Diagram
Identify various classes! their #ehaviors! and attri#utes! and dra" the class diagram.
2: Introduction to Unified Modeling Language ©NIIT
Benerate 2ffer
Letter
Update
Intervie"
(etails
9M$
DID 4.5
3ccept F De%ect
2ffer Letter
$osting
DID 4.5
9M$
'A"ULT% O!$ER#ATION$
©NIIT Introduction to Unified Modeling Language 2;
Lesson *"
E+a,-les and Analogies
Defer to the $urchase (epartment case study as discussed in the 9'amples and 3nalogies section of
Lesson1.
The Colla$oration Diagram
3 ,tatechart diagram is used to depict the change in the state of the o#%ect "ithin the system #ecause of
an e'ternal influence i.e.! some action happening outside the system that causes the state to change in
the o#%ect "ithin the system.
3n 3ctivity diagram is used to depict the change in state of the o#%ect "ithin the system #ecause of an
internal influence i.e.! some action happening inside the system that causes the state to change in the
o#%ect "ithin the system.
Gou need to again refer to the $urchase (epartment case study as discussed in the J9'amples and
3nalogiesK section of Lesson 1.
The So2tware Components
Item De6uest Deceiving Manager component
$urchase 2rder Manager component
2rdered Items Deceiving Manager component
2? Introduction to Unified Modeling Language ©NIIT
Item De6uest
Deceiving
Manager
,ends De6uests
for items
,tore)eeper $urchasing
cler)
$rocess item
re6uests
$urchase 2rder
Manager
,ends
purchase order
$urchasing
cler)
,upplier
$rocess
purchase order
2rdered Items
,upplying
Manager
,u#mits
invoice
,upplier $urchasing
cler)
,ends
ordered items
De6uested Items
Issue Manager
Issues
re6uested items
$urchase
cler)
,tore)eeper
Aor"ards
re6uested items
De6uested Items Issue Manager component
The Component Diagram
Defer to the $urchase (epartment case study as discussed in the 9'amples and 3nalogies section of
Lesson 1.
The Deployment Diagram
3odes
User node
,erver node 4application soft"are5
,erver node 4data#ase5
The Deployment Diagram
'A)
<.1 -an all classes have association roles in a colla#oration diagram>
3.1 No! only classes that e'hi#it some #ehavior can have an association role in a colla#oration diagram.
<.2 =hat is the difference #et"een the statechart diagram and the activity diagram>
3.2 The statechart diagram descri#es the #ehavior of a class "hen accessed #y e'ternal processes or
entities. It depicts the states and responses of a class "hile performing an action.
The activity diagram depicts the activities of a class. It descri#es the #ehavior of a class "hen
accessed #y internal processes or entities.
©NIIT Introduction to Unified Modeling Language 2@
Item De6uest
Deceiving Manager
component
2rdered Items
Deceiving Manager
component
De6uested Items
Issue Manager
component
$urchase 2rder
Manager
component
3pplicatio
n ,erver
Node
(ata#ase
,erver
Node
User Node
<.0 -an all control classes #ecome components>
3.0 3ll control classes are candidates for #ecoming components. =hile deciding on the components!
)eep in mind their reusa#ility! implementa#ility! and maintaina#ility.
Additional In-uts
Aor a deeper and comprehensive understanding of components and use of deployment diagrams! refer to
*The Unified Modeling Language User Buide+ #y Cooch! Dum#augh! and Jaco#son. In addition! do not
try to relate components as discussed in UML "ith the -omponent 2#%ect Model in class! as this "ill
confuse students. ,tudents may as) for alternate e'amples! and you need to increase your )no"ledge
#ase through additional references.
$olutions0 1uided &ractice
&ractice *0 "reating the "olla3oration /iagra,
Association &oles
,ends application.
Aor"ards application.
)essage 4lows
3pplication flo"s from 9mployee to 3pplication Manager.
3pplication flo"s from 3pplication Manager to Degional ID Iead 4.5.
The Colla$oration Diagram
&ractice 20 "reating the "o,-onent /iagra,
The So2tware Component
3pplication Manager component
The Component Diagram
0E Introduction to Unified Modeling Language ©NIIT
3pplication
Manager
component
3pplication
Manager
,ends
application
9M$ DID4.5
Aor"ards
application
&ractice 50 "reating the /e-loy,ent /iagra,
3odes
User node
,erver node 4application soft"are5
,erver node 4data#ase5
The Deployment Diagram
Additional E+ercises .or $tudents
1. In the internal %o# postings process! the employees send their applications in response to the
vacancy information to the regional ID "here the vacancy e'ists. The s)ills of the applicants are
then matched "ith the s)ills re6uired for the vacancy. 3pplicants "ho possess the re6uired s)ills are
then short&listed and an intervie" schedule is dra"n up. The short&listed applicants are then
informed of the intervie" schedule.
Use the classes and their #ehaviors and attri#utes that have #een identified for this part of the
internal %o# postings process to/
 Identify association roles and message flo"s.
 (ra" the colla#oration diagram.
2. In the internal %o# postings process! the regional ID head updates the intervie" details #ased on the
proceedings. The selected applicants are then given a ne" offer letter. The applicant informs the ID
head of the region "here the vacancy e'ists either #y accepting or declining the offer letter.
Use the classes and their #ehaviors and attri#utes that have #een identified for this part of the
internal %o# postings process to/
 Identify association roles and message flo"s.
 (ra" the colla#oration diagram.
0. In the internal %o# postings process! the employees send their applications! in response to the
vacancy information! to the regional ID "here the vacancy e'ists. The s)ills of applicants are then
matched "ith the s)ills re6uired for the vacancy. The applicants "ho possess the re6uired s)ills are
then short&listed and an intervie" schedule is dra"n up. The short&listed applicants are then
informed of the intervie" schedule.
Use the classes and their #ehaviors and attri#utes that have #een identified for this part of the
internal %o# postings process to/
 Identify various soft"are components.
 (ra" the component diagram.
©NIIT Introduction to Unified Modeling Language 01
3pplicatio
n ,erver
Node
(ata#ase
,erver
Node
User Node
7. In the internal %o# postings process! the regional ID head updates the intervie" details #ased on the
proceedings. The selected applicants are then given a ne" offer letter. The applicant informs the ID
head of the region "here the vacancy e'ists either #y accepting or declining the offer letter.
Use the classes 4#ehaviors and attri#utes5 that have #een identified for this part of the internal %o#
postings process to/
 Identify various soft"are components.
 (ra" the component diagram.
8. In the internal %o# postings process! the employees send their applications! in response to the
vacancy information! to the regional ID "here the vacancy e'ists. The s)ills of the applicants are
then matched "ith the s)ills re6uired for the vacancy. The applicants "ho possess the re6uired
s)ills are then short&listed and an intervie" schedule is dra"n up. The short&listed applicants are
then informed of the intervie" schedule.
 Identify various nodes.
 (ra" the deployment diagram.
:. In the internal %o# postings process! the regional ID head updates the intervie" details #ased on the
proceedings. The selected applicants are then given a ne" offer letter. The applicant informs the ID
head of the region "here the vacancy e'ists either #y accepting or declining the offer letter.
 Identify various nodes.
 (ra" the deployment diagram.
02 Introduction to Unified Modeling Language ©NIIT
'A"ULT% O!$ER#ATION$
©NIIT Introduction to Unified Modeling Language 00
$OLUTION TO A//ITIONAL
E(ER"I$E$ IN A&&EN/I(
Lesson *A
9'ercise 1
Use Case Diagram
07 Introduction to Unified Modeling Language ©NIIT
-ustomer
-ler)
2pen 3F-
Aills deposit slip
and amount
-ler)
-ustomer
Manager
-ustomer
Aills the
3pplication Aorm
-hec)s
application for
correctness
-ler)
-ler)
,anctionFDe%ects
the application
-ler)
Manager
9'ercise 2
Use Case Diagram
©NIIT Introduction to Unified Modeling Language 08
$assenger
Aills the
Deservation ,lip
Coo)ing
-ler)
9nters the $assenger
Deservation (etails
Coo)ing
-ler)
-hec)s no of
seats availa#le
$assenger
$rints the tic)et
Ma)es
Deservation
-hec)s the
deposit slip and
amount
-ler)
3ctivates the
account
-ustomer
Updates the
records
Lesson *!
9'ercise 1
Class Diagram
0: Introduction to Unified Modeling Language ©NIIT
C"stomer
custName
enter3pplication
Aorm45
1 1 1 1
Application Acceptor
validate3pplication
Aorm45
Cler(
emp-ode
empName
(esignation
accept3pplication
Aorm45
Application
appNo
custName
3ddress
type3ccount
1
1
$ays the
3mount
Coo)ing
-ler)
$assenger
Iandover Tic)et
Coo)ing
-ler)
$assenger
9'ercise 2
Class Diagram
Lesson *"
9'ercise 1
9'ercise 2
©NIIT Introduction to Unified Modeling Language 0;
Passenger
Name
3ge
enterDeservation,lip4
5
!oo(ing Cler(
emp-ode
empName
acceptsDeservation,lip4
5
1
1
1
1
&eser#ationDetail
Acceptor
chec),eats3vaila#le45
&eser#ation
Slip
trainNo
trainName
-lass
3ge
(ate
9
c
o
d
e
/
3
p
p
l
y

4
5
1
1..L
3pplication
3cceptor
3pplication
3cceptor
,u#mits the
3pplication form
-ler)
.alidates the
contents
Manager
9'ercise 0
9'ercise 7
9'ercise 8
9'ercise :
0? Introduction to Unified Modeling Language ©NIIT
3pplication
,erver Node
(ata#ase
,erver Node
User Node
3pplication
,erver Node
(ata#ase
,erver Node
User Node
Deservation(etail
3cceptor
$assenger
Deservation(etail
3cceptor
tic)et$rinter
<uery,eats
9nter passenger
details
-hec)s seats
availa#ility
,eats availa#le
$rints tic)et
Coo)ing cler)