Beruflich Dokumente
Kultur Dokumente
UNIT-V
Basic Behavioral Modeling-II:
Diagrams, Activity Diagrams.
UNIT - VI
Use
cases,
Use
case
TEXT BOOKS
1. Grady Booch, James Rumbaugh, Ivar Jacobson : The
Unified Modeling Language User Guide, Pearson Education.
2. Hans-Erik Eriksson, Magnus Penker, Brian Lyons, David
Fado: UML 2 Toolkit, WILEY-Dreamtech India Pvt. Ltd.
REFERENCES:
1. Meilir Page-Jones: Fundamentals of Object Oriented Design in
UML, Pearson Education.
2. Pascal Roques: Modeling Software Systems Using UML2,
WILEY-Dreamtech India Pvt. Ltd.
3. Atul Kahate: Object Oriented Analysis & Design, The McGrawHill Companies.
4. Mark Priestley: Practical Object-Oriented Design with
UML,TATA McGrawHill
5. Craig Larman Appling UML and Patterns: An introduction to
Object Oriented Analysis and Design and Unified Process,
Pearson Education.
UML
Why Unified ?
James
Rumbaugh, Grady Booch, and Ivar Jacobson
developed 3 different notations.
But later agreed to adopt as standard a variation on a
notation originally developed by David Embley and his
colleagues.
: 66 sq m
2.Min Lot Area : 120 sq m
3.Living Area, Kitchen and Dining Area
4.Dining is right to the kitchen.
5.Entrance is on right with living space,
following the kitchen and dining.
6.2 bedrooms
7.2 T&B
CHAPTER-1
Why We Model
10
We build models to
1.
2.
3.
4.
To manage risk.
11
1. Importance of Modeling
What is a model?
A Model is a simplification of reality.
It provides the blue prints of a system.
A good model includes the elements which have greater
importance and omits minor elements which are of lower
importance
12
Why
do we model?
The fundamental reason to have a model is we can
better understand the system we are developing.
Through modeling, we can achieve the following 4 aims:1) Models help us to visualize a system as it is or as we
want it to be.
2) Models permits us to specify the structure or
behavior of a system.
3) Models give us a template that guides us in
constructing a system.
4) Models document the decision we have made.
14
2. Principles of Modeling
1.
2.
3.
17
3. Object-Oriented Modeling
1.
2.
3.
Summary of chapter 1
1.
Importance of modeling
2.
Principles of modeling,
3.
visualize a system.
specify the structure or behavior of a system.
template that guides us in constructing a system.
document the decision
22
INTRODUCTION TO UML
CHAPTER 2
Introduction To UML
Overview of UML
The UML is a language for
a)
b)
c)
d)
Visualizing
Specifying
Constructing
Documenting
the artifacts of software-intensive system.
26
27
3) If the developer who cut the code never wrote down the
models that were in his/her head, that information would
be lost forever or, at best, only partially recreatable from
the implementation, once that developer moved on.
Overview of UML
a)Visualizing
b)Specifying
c)Constructing
d)Documenting
33
-Project Plan
-Tests
-Prototypes
-Releases.
Overview of UML
a)Visualizing
b)Specifying
c)Constructing
d)Documenting
1.
2.
3.
36
a)
b)
c)
37
UML Terminology
Building blocks
Things
Structural (7)
Behavioral (2)
Grouping (1)
Annotational (1)
Relationships
Diagrams
Class, Interface,
Active class, Use case,
Dependency,
Component,
Generalization,
Collaboration, Node
Interaction,
State Machine
Package
Note
Associations,
Realization
Use case,
Class,
Object,
Sequence,
Collaboration,
State chart,
Activity,
Component,
Deployment.
Relationships
Diagrams
Structural (7)
Behavioral (2)
Grouping (1)
39
Annotational (1)
1. Structural Things
1.
2.
3.
4.
5.
6.
7.
Class
Interface
Collaboration
Use case
Active class
Component
Node
Things
Relationships
Diagrams
Class, Interface,
Structural (7)Active class, Use case,
Component,
Collaboration, Node
Behavioral (2)
Grouping (1)
Annotational (1)
40
UML Terminology
Building blocks
Things
Relationships
Diagrams
Class, Interface,
Active class, Use case,
Behavioral (2) Component,
Collaboration, Node
Grouping (1)
Structural (7)
(1)
Class:Annotational (1)
A class is a description of a set of objects that share
the same attributes, operations, relationships and
semantics.
A class implements one or more interfaces.
Window
class
Origin
Size
Open( )
Close( )
Move( )
Display( )
Name
Attributes
Operation
(2)
Interface
Relationships
Class, Interface,
Structural (7)Active class, Use case,
Component,
Collaboration, Node
Behavioral (2)
Grouping (1)
Annotational (1)
Diagrams
42
ISpelling
Interface
UML Terminology
Building blocks
Things
Relationships
Diagrams
UML Terminology
Building blocks
Things
Relationships
Structural (7)
Class, Interface,
Collaboration, Use case,
Component,
Active class, Node
Behavioral (2)
Diagrams
Grouping (1)
Annotational (1)
UML Terminology
Building blocks
Things
Relationships
Structural (7)
Class, Interface,
Collaboration, Use case,
Component,
Active class, Node
Behavioral (2)
Diagrams
Grouping (1)
Annotational (1)
Withdraw money
Use case
46
UML Terminology
Building blocks
Things
Structural (7)
Behavioral (2)
Relationships
Diagrams
Class, Interface,
Collaboration, Use case,
Component,
Active class, Node
Grouping (1)
Annotational (1)
UML Terminology
Building blocks
Things
Relationships
Diagrams
(5) Active class: An active class is a class whose objects own one or more
processes or threads and therefore can initiate control
activity.
UML Terminology
Building blocks
Things
Relationships
Diagrams
Suspend()
Flush()
Active class
49
The remaining two elements component and nodesthey represent physical things, where as previous five
things ( class, interface, collaboration, usecase, active
class) represent conceptual or logical things.
UML Terminology
Building blocks
Things
Structural (7)
Behavioral (2)
Relationships
Diagrams
Class, Interface,
Collaboration, Use case,
Component,
Active class, Node
Grouping (1)
Annotational (1)
50
51
orderform.java
Component
UML Terminology
Building blocks
Things
Structural (7)
Behavioral (2)
Relationships
Diagrams
Class, Interface,
Collaboration, Use case,
Component,
Active class, Node
Grouping (1)
Annotational (1)
Database
server
Node
2. Behavioral Things
Relationships
Class, Interface,
Active class, Use case,
Component,
Collaboration, Node
Interaction,
State Machine
Diagrams
UML Terminology
Building blocks
Things
Structural (7)
Behavioral (2)
Grouping (1)
Relationships
Diagrams
Class, Interface,
Active class, Use case,
Component,
Collaboration, Node
Interaction,
State Machine
Annotational (1)
(1) Interaction:
An Interaction is a behavior that comprises a set of
messages exchanged among a set of objects within a
particular context to perform a specific purpose.
display
Message
56
UML Terminology
Building blocks
Things
Structural (7)
Behavioral (2)
Grouping (1)
Relationships
Diagrams
Class, Interface,
Active class, Use case,
Component,
Collaboration, Node
Interaction,
State Machine
Annotational (1)
State
58
3. Grouping Things
UML Terminology
Building blocks
Things
Structural (7)
Behavioral (2)
Grouping (1)
Relationships
Diagrams
Class, Interface,
Active class, Use case,
Component,
Collaboration, Node
Interaction,
State Machine
Package
Annotational (1)
Business rules
Package
4. Annotational Things
62
Note
63
64
DEPENDENCY:
Dependencies
65
ASSOCIATION:-
*
employee
Association
GENERALIZATION:
A generalization is a specialization/generalization
relationship in which objects of the specialized elements
(the child) are substitutable for objects of the generalized
elements (the parent).
In this way, the child shares the structure and the behavior
of the parent.
Represented as a solid line with a hollow arrow head
pointing to the parent.
Generalization
Generalization
relationship.
AGGREGATION:
Hand
Finger
REALIZATION:
Realization
Diagrams in UML
Scenario
Scenario
Diagrams
Use Case
Diagrams
Diagrams
Scenario
Scenario
Diagrams
Statechart
Diagrams
Diagrams
Scenario
Scenario
Diagrams
Collaboration
Diagrams
Diagrams
Use Case
Use Case
Diagrams
Sequence
Diagrams
Diagrams
State
State
Diagrams
Class
Diagrams
Diagrams
State
State
Diagrams
Object
Diagrams
Diagrams
State
State
Diagrams
Component
Diagrams
Diagrams
Models
Component
Component
Diagrams
Deployment
Diagrams
Activity
Diagrams
Diagrams
1. Class Diagram
2. Object Diagram
3. Component Diagram
4. Deployment Diagram
5. Activity Diagram
9. UseCase Diagram
A Well-formed model is one that is semantically selfconsistent and in harmony with all its related models.
3.Common Mechanisms
The 4 common mechanisms that apply consistently
throughout the language.
1.
2.
3.
4.
Specifications
Adornments
Common Divisions
Extensibility mechanisms
88
1.
Specifications:-
2. Adornments:
*
Employee
90
3.Common Divisions
Jan :Customer
:Customer
Elyse
IUnknown
SpellingWizard.dll
ISpelling
4.Extensibility Mechanisms
Allows you to extend the language by adding new building
blocks derived from existing ones, creating new
properties and specifying new semantics. Includes:
1.
2.
3.
Stereotypes
Tagged values
Constraints
93
Stereotypes
Extend the vocabulary of the UML by creating new model
elements derived from existing ones but that have specific
properties suitable for your domain/problem.
Example:
How many types of classes are there. Like you have
Abstract Class, Derived Class, Exception Class,
Constraint Class etc..
Named stereotype
<<metaclass>>
Model Element
3.Constraints:
Stereotype
<< Exception>>
Overflow
EventQueue
{version =3.2
Author=egb }
add( )
Tagged
value
{ordered}
remove( )
flush( )
Extensibility Mechanisms
Constraints
Architecture
Visualizing,
specifying,
constructing,
and
documenting a software-intensive system demands
that the system be viewed from a number of
perspectives.
System's architecture
Most important artifact
Used to manage different viewpoints; hence controls iterative and
incremental development of a system throughout its life cycle.
Architecture is the set of significant decisions about
1. Organization of a software system
2. Selection of the structural elements and their interfaces by
which the system is composed
3. Their Behavior, specified in the collaborations among elements.
4. Composition of these structural and behavioral elements into
progressively larger subsystems
5. Architectural style that guides this organization: the static and
dynamic elements and their interfaces, their collaborations, and
their composition
Software Architecture
Defined
Software architecture is not only concerned with
structure and behavior, but also with usage, functionality,
performance,
resilience,
reuse,
comprehensibility,
economic and technology, constraints and trade-offs, and
aesthetic concerns.
System Assembly
Configuration Management
Design View
Behavior
Use-Case
View
Process View
Performance
Scalability
Throughput
Implementation View
Deployment View
System topology
Distribution
Delivery
Installation
System Assembly
Configuration Management
2. Design View
4. Implementation View
Classes, Interfaces,
Collaborations
Components
Use cases
Behavior
Performance
Scalability
Throughput
Organization
Package, subsystem
5. Deployment View
System topology
Distribution
Delivery
Installation
Dynamics
Interaction
State machine
Nodes
6.
2. Design View
1.
2.
3.
4.
5.
Major
Elements:
Classes,
Interfaces
and
Collaborations
Describes: vocabulary of problem and solution,
functional requirements of system
Stakeholders concerned : End Users, analysts,
design engineers
Deals with : services that system provides to its
end-users
Refers static aspects :class diagrams +object
diagrams and dynamic aspects by considering
interaction , state chart and activity diagrams.
106
3. Process View
1.
2.
3.
4.
5.
4. Implementation View
1.
2.
3.
4.
5. Deployment View
1.
2.
3.
4.
110
Process
Nature
Primary
artifact
Used for
Use case
driven
use case
Architecture
centric
systems
conceptualizing, constructing, managing,
architectur and evolving system under development.
e
Iterative and
Incremental
and hence
Risk Driven
Lifecycle Phases
Inception
Elaboration
Construction
Transition
time
Inception
Define the scope of the project and
develop business case
Elaboration
Construction
Transition
Inception Elaboration
Construction
Transition
Business Modeling
Requirements
Analysis & Design
Implementation
Test
Deployment
Supporting Workflows
Configuration Mgmt
Prj. Management
Environment
Preliminary
Iteration(s)
Iter.
#1
Iter.
#2
Iter.
#n
Iter. Iter.
#n+1 #n+2
Iterations
Iter.
#m
Iter.
#m+1