Sie sind auf Seite 1von 47

6 

Y Unified Modelling Language


~ A language for specifying, visualising & constructing the
descriptive diagrams and documentation of software
systems
~ Industry standard for object-oriented modelling
~ Helps in designing and describing software system
~ We¶re aiming for a well-designed, robust &
maintainable object-oriented system which meets the
users¶ requirements
 What does the user require?
 Which classes should there be?
 What responsibilities should each class have?
 How should objects interact?
6

   
 
Y phe 1980s
~ C++ was born
~ Object-oriented programming language emerged ±
Smalltalk
~ OO graphical modelling languages appeared in 1988
Y phe 1990s
~ A number of key books and leading figures between 1988
& 1992
~ Unified Method version 0.8 by Booch & Rumbaugh, 1995
~ UML 1.0 by Booch, Rumbaugh & Jacobson (a.k.a. ³3
amigos´), 1997
~ An open standard controlled by the Object Management
Group, a consortium of companies www.omg.org
~ UML 2.0, a major revision adopted by OMG in 2005
phere are 9 types of diagrams in UML
Use Case
Sequence Diagrams
Diagrams
Class
Diagrams
Collaboration
Diagrams
Object
Diagrams
Activity Model
Diagrams Component
Diagrams
Statechart
Diagrams Deployment
Diagrams
½     



 
Y Structural diagrams
~ Static structural diagrams
 a 


~ Implementation diagrams
 a 
    
Y Behavior diagrams
~    
~ Interaction diagrams
 ½   
 a 

~ ½  
~  
r 
  

½

0   
   
Y 0  Register a new member(id, name, phone no.,
address)done by librarian.

Y 0 Update/Delete a student record. phe student will be


selected by librarian using the unique student id. Name,
address, phone number of a student can be updated. A
student record can be deleted, if no books are issued to his
id.

Y 0 Add a book. (Accession no. ,title, author, publication)

Y 0 Delete/Update a book. A book can be deleted by


librarian if it¶s not issued to any member. A book can be
updated by it¶s unique accession number. pitle, author and
publication can be updated.
0   
   

Y 0  Search Book. Books can be searched using


accession no., title, author or publication.

Y 0  üiew a book detail. By using the title a book¶s detail


(including no. of copies) can be viewed by the member or
librarian.

Y 0 !üiew student detail. Librarian can view member


name, id, phone, addr., books issued to user(title, accession
no., due date), fine details.

Y 0 "üiew member¶s status: After login a member can


view books (details) issued to him, due fine to be paid.

 
  
Y Use cases
~ are a technique for capturing the functional
requirements of a system
~ describe the interactions between the users of a
system & the system itself
Y A narrative of how a system is used
~ p  (always) & ô  (when useful)
descriptions
~ Deep high-level, don¶t divide into lots of sub use
cases
~ Collectively describe all possible interactions with the
system
Y [or example:
~ Library use case: #$




r






r




  ½


 
Use forget
password
Login option

[aculty Add new


Member student
Update/Delete
student

Add book

Update/Delete
book
Student Librarian
Search book

üiew Book
detail

üiew
member¶s üiew Student
status detail





 
 
 
Y Use Case pitle
Y Use Case Id
Y Actors
Y Description
Y Pre conditions
Y pask Sequence
Y Post conditions
Y Modification History
Y Author



  ½



 
1. Use Case pitle Search Book

2. Abbreviated pitle Search Book


3. Use Case Id 5
4. Actors Member

5. Description
With this search facility, user can specify any of search criteria. [or example, title,
author, publication, accession no. etc., and search the desired book.

5.1. Pre Conditions: User must be logged in(session)


5.2. pask Sequence
1. Search screen will be shown by the system
2. Select search criteria and enter the required information.
3. On clicking the search button, system will show search results.

5.3. Post Conditions:


1. User can view his desired results.
2. User can go for another search.

6. Modification History: Date 21-apr-2010


7. Author: Harkiran Daur Project Id LMS
•   
Y Activity diagrams are
~ a technique to describe procedural logic, business
process & work flow
~ similar to flowcharts, but the latter does not support
parallel behaviour
~ used to model a specific use case at a more detailed level
Y States
~ have transitions to other states
~ may be either
 action states: atomic action
 activity states: actions that can be broken down
~ may have  , explained by conditions & merges
~ may have Æ$ %  for modelling simultaneous
activities
•   
Y  & 
User
~ Long rounded rectangle Information

Y ½&' ½
~ unique with only one transition line

Y r½
~ not necessarily unique

Y p
~ Lines indicate sequential flow of actions.
Must be labeled after a decision.
~ Arrows indicate direction of next action
½
  ½
½
 
Ê   Ê 

Authentication User
Login
Information
  
 
 



 

Book details
Search Book

    
 
 

  

Logout Book
Information
½
   
Y A State chart diagram shows the lifecycle of an object
† A Ú   is a condition of an object for a particular time
† An  causes a Ú  from one state to another
state
† Here is a State chart for a Phone Line object:


Õ ÕÕ


 
 ÕÕ
½
   
Iniil 

· 


prnsiion

v n/ Gurd
[invlid us r]
condiion

nd 
½
   
   ½

 


• 
 

 


 

½
 

 
 


  


  
!" 


 


"
   
Y Interaction:describes a collection of communications
between instances, including all ways to affect instances,
like operation invocation, as well as creation and destruction
of instances
Y phe communications are partially ordered (in time)
Y Show interactions between instances in the model
~ graph of instances (possibly including links) and stimuli
~ existing instances
~ creation and deletion of instances
Y Dinds
~ sequence diagram (temporal focus)
~ collaboration diagram (structural focus)
½
#

  
Y A sequence diagram is an interaction diagram that
emphasizes the time ordering of messages.
Y A sequence diagram shows a set of objects and the
messages sent and received by those objects.
Y phe objects are typically named or anonymous
instances of classes, but may also represent instances
of other things, such as collaborations, components,
and nodes.
Y You use sequence diagrams to illustrate the dynamic
view of a system.
   
Y A collaboration diagram is an interaction diagram that
emphasizes the structural organization of the objects
that send and receive messages.
Y A collaboration diagram shows a set of objects,links
among those objects, and messages sent and received
by those objects.
Y phe objects are typically named or anonymous
instances of classes, but may also represent instances
of other things, such as collaborations, components,
and nodes.
Y You use collaboration diagrams toillustrate the dynamic
view of a system
"
   

 


½   
 
 


x y z 1.1:
1.2:
 x y



1.1.1:
ô  

  z

 
   
½
#

 


  ½
User :LMS Database
 
    
 
 Æ   
    

 
    
$
 


! 

$
"
$Æ

( 



)  
   ½
  
Ú Ú
 
Ú 
 
Ú 
1: Õ
:   2: Õ 
:y 
g: 

½
:Õ   
:  Õ Õ
: Õ  Õ :
Õ  
10:Õ  
6   
Y A class diagram shows the existence of classes and
their relationships in the logical view of a system
Y UML modeling elements in class diagrams are:
~ Classes, their structure and behavior.
~ relationships components among the classes like
association, aggregation, composition, dependency
and inheritance
~ Multiplicity and navigation indicators
~ Role names or labels.
Y Association
Y Aggregation
Y Composition
Y Dependency
Association
phese are the most general type of relationship:

Y It denotes a semantic connection between two classes.

Y It is a weak coupling as associated classes remain


somewhat independent of each other.

Y xample:

Customer ApM system


Aggregation
phis is a special type of association.

Y phe association with label ³contains´ or ³is part of´ is an


aggregation.

Y It represents ³has a ³ relationship.

Y It is used when one object logically or physically


contains other.

Y phe container is called as aggregate.

Y It has a diamond at its end .

Y It expresses a whole - part relationships.

Customer ApM card


Composition
phis is a strong form of aggregation.
Y It expresses the stronger coupling between the classes.
Y phe owner is explicitly responsible for creation and
deletion of the part.
Y Any deletion of whole is considered to cascade its part.
Y phe aggregate has a filled diamond at its end.

Company Department
Dependency
Y Dependency is a semantic relationship between two
things in which a change to one thing (the independent
thing) may affect the semantics of the other thing (the
dependent thing).

Y Graphically, a dependency is represented as a dashed


line, possibly directed, as in [igure
 $$$
  ½
 
%
 &
%
 &
"
 

Class Object

Company HiA: Company


Possible object
noOfmploees : noOfmploees=600
int name object class
attribute
with value
%
  

a 


Language: :LocatedAt Gimlemoen:


Company
Department Office
1

Possible HiA: Company


1..*
LocatedAt object diagram
Department Office
* 1..*

ngineering : :LocatedAt Grooseveien:


Department Office

Link - A link is an instance of an association,


analogous to an object being an instance of a
class.
J
%
 
J
%
  ½

: Updated by
 
 • 

: Updates info of
: Info stored in

  

  Ê  
: Searches
6 
 

Y phe component diagram's main purpose is to show the


structural relationships between the components of a
system. [IBM Rational Libraries]

Y UML component diagrams are great for identifying the


architectural landscape for your system as they enable
you to model the high-level software components, and
more importantly the interfaces to those components.
! 
 

Y In UML 2 specification, Œ Æ 


 *connected to the
outside of the rectangle.
Y In this second approach the interface symbols with a complete
circle at their end represent an interface that the component
provides -- this lollipop" symbol is shorthand for a realization
relationship. Interface symbols with only a  Æ  at their end
represent  Æ      . [or
example, the Order component ÃÚ two interfaces: Orderntry
and AccountPayable, and the Order component 
Ú the
Person interface.

  && ½

  
ncryption
Data access

Student
Access control

Data access

Librarian

Data access Persistence

[acilities

JDBC
6 

   
Y A deployment diagram shows the relationship among
software and hardware components in the delivered
system.
Y phese diagram include nodes and connections between
nodes.
Y ach node in deployment diagram represents some
kind of computational unit, in most cases a piece of
hardware.
Y Connection among nodes show the communication
path over which the system will interact.
Y phe connections may represent direct hardware
coupling line RS-232 cable, thernet connection, they
also may represent indirect coupling such as satellite to
ground communication.


   ½


  

Library
Management University
DB
<<JSPs>> <<database>
>

Student

Librarian

Persistence
<<infrastructure>>
00½r

Y ROS = Rational Object Oriented Software ngineering

Y Rational Rose is a set of visual modeling tools for


development of object oriented software.

Y Rose uses the UML to provide graphical methods for


non-programmers wanting to model business
processes as well as programmers modeling application
logic.
00½r"


Browser

Diagram
window

Diagram
toolbar

Documentation
Window
docked/floating
ü
  

üiews

Diagrams
0




Y Unified Modeling Language User Guide, Grady Booch

James Rumbaugh Ivar Jacobson,Addison Wesley

Y Mastering UML with Rational Rose 2002, Wendy Boggs

Y phe Unified Modeling Language Reference Manual,

James Rumbaugh Ivar Jacobson Grady Booch, Addison

Wesley

Das könnte Ihnen auch gefallen