Unit Two: System Modeling Using Uml
Unit Two: System Modeling Using Uml
Unit Two: System Modeling Using Uml
SYSTEM MODELING
USING UML
Part I
Functional Modeling:
Use Case Diagram
Outline
Modelling Concept
Overview of UML
More of UML
Building blocks
Common mechanisms
entirety.
Code is not easily understandable by developers who did not write it
We need simpler representations for complex systems
Modeling is a means for dealing with complexity
OO Analysis:- modeling application domain
(represents all aspects of the user’s problem
Object which includes physical environment, peoples,
work process etc.)
Oriented
Modeling
OO Design:- modeling the solution domain
(which represents the system design and object
design activities of the development process)
2) Overview of UML
What Is UML?
A diagrammatic object-oriented modeling language.
Use diagrams to document object-based decomposition of systems
and to show the interaction b/n these objects and their dynamics.
Nonproprietary standard for modeling software systems.
In general, UML is resulted from the unification of OMT, Booch method
and OOSE.
UML has also been influenced by other object-oriented notations, such as
those introduced by Mellor & Shlaer [1998], Coad & Yourdon [1995],
Wirfs-Brock [Wirfs-Brock et al., 1990], Martin and Odell [Martin & Odell,
1992].
Cont ...
Cont ...
Why UML?
To provide a standard notation that can be used by all OO methods and
to select and integrate the best elements of precursor notations.
Standardized notation without sacrificing specialized model data
To have common language that can be used from product conception to
delivery, from system to detailed design levels
UML provide convenient communication mechanism between all
role players in the software development field from the client to
the business analyst to the architects, designers and developers.
To reduced learning curve across projects
To avoid multitude interpretation of the same concepts
To ignore confusion
To make the users undistracted by their decisions
Cont ...
Why UML? Advantages
A graphical view simplifies the understanding of system.
Increased domain and design model reuse
Reduces the risk of failure,
Improves productivity and quality,
Facilitates maintainability
Usually results in reduced complexity.
Increased customer involvement /understanding of problem translation
to product solution
Designed for a broad range of applications and it provides constructs
for a broad range of systems and activities (e.g., distributed systems,
analysis, system design, data modeling, modeling hardware systems,
deployment)
3) More of UML
A language whose vocabulary and rules focus on the conceptual and
physical representation of a system.
UML defines structural and behavioral things and diagrams.
UML is the language of blueprints for software.
It is a graphical language for
Visualizing
Specifying – building models that are precise, unambiguous, complete
Constructing – map from a model in UML to a programming language
Documenting
Association
Cont ...
C. Generalization (is a): a specialization/generalization relationship in
which objects of the specialized element (the child) are
substitutable for objects of the generalized element (the parent)
1.3 Diagram
The graphical representation of a set of elements
Help to visualize a system from different perspectives
May contain any combination of things and relationships.
B. Diagrams used to describe behavior
A. Diagrams used to describe
and Function - dynamic
structure - static
Use Case diagram (functional)
Class diagram
Sequence diagram
Object diagram
Activity diagram
Component diagram
Collaboration diagrams
Deployment diagram
Statechart diagram
Cont ...
Fig: An overall view of UML diagrams showing how each diagram leads
to the development of other UML diagrams
Cont ...
UML Building Block Rules
UML’s building blocks should be put together to develop a well-
formed model.
A model that is semantically self-consistent and in harmony with all its
related models.
The UML has semantic rules for
Names: What you can call things, relationships, and diagrams
: Costomer
Alemayehu : Costomer
2) Common Division: Costomer
-name
name name
class and object -address
-phone address address
phone phone
Cont…
3) Adornments
Most elements of UML have a unique and direct graphical notation that
provides visual representation of the most important aspects of the element.
Every element in the UML’s notation starts with a basic symbol, to which
can be added a variety of adornments to that symbol. Transaction
Making to look more attractive/easily understandable
+execute()
+rollback()
#priority()
4) Extensibility Mechanisms -timestamp()
UML can be extended using the following mechanisms
Stereotypes: Extends the vocabulary of UML, allowing you to create
new kinds of building blocks that are derived from existing ones but that
are specific to your problem.
Constraints: Extends the semantics of a UML building block, allowing
you to add new rules or modify existing ones.
C. Architecture
Before designing and developing the system, the architecture needs to made
by visualize the system from different viewer’s perspective.
Architecture is the set of significant decisions/description about
The organization of a software system
The selection of the structural elements and their interfaces which the
system composed of it.
Their behavior, as specified in the collaborations among those elements
The composition of these structural and behavioral elements into
progressively larger subsystems
The architectural style that guide this organization:
The static and dynamic elements and their interfaces,
Software architecture is not only about architecture and behavior, but also
concerned with usage, functionality, performance, resilience, reuse,
comprehensibility, economic and technology constraints and trade-offs.
View of Systems
A view is simply a subset of UML modeling constructs that represent one
aspect of the system
Use to describe the system architecture.
Each of the views involve structural and behavioural models
Systems can be viewed from a number of perspectives - different
Stakeholders:
Refers to system owners, end users, analyst and designer, system
developers, project managers etc.
Each looks at the system in different angle at different times over the
project’s life span.
System Architecture can be used to manage these different viewpoints,
therefore controlling the development of a system throughout its life cycle
Cont…
UML captures these different angles/viewpoints as a set of 5 interlocking
views: -
behavior
Use case view
Deployment
Process view
view System topology
Performance distribution
scalability delivery
throughput installation
• Each view focused on a particular aspect of the system, are stand alone
and interact with each other
Cont….
Use case view:- the centre view which connects all other views
Models the functionality of the system as perceived by outside users, called actors.
Focuses on scenarios executed by human users and external systems.
Explain what the new system will do without specifying how it will do it
Purpose:- To list the actors and use cases and show which actors participate
in each use case.
End-product: use case diagrams
Implementation view
Encompasses the components and files that are used to assemble and
release the physical system
End-product: Component diagrams
Deployment view
Focuses on the geographic distribution of the various software elements
on hardware and other physical elements that constitute a system
Encompasses the nodes that form the system’s hardware topology on
which the system executes
End-product: Deployment diagram
Use Case Diagram:- Functional
Model
3.1 Use Case Model
Use cases are a standard technique for gathering requirements in
many modern software development methodologies.
E.g. In behavioral methodology - One of the first and primary
means of gathering requirements
The starting point for UML modeling.
Used to capture the intended behaviour of system or business
processes carried out in the system under development as it appears
to the outside user.
Represents the functional requirements of a system
A depiction of a system’s behavior or functionality under various
conditions as the system responds to requests from users functioning
for a specific business purpose.
The Use case diagram is used to identify the primary elements and
processes that form the system.
Cont...
Use case Modeling could be
Essential Use Case Diagram
Used at requirement elicitation stage
Technology free
Include relationship
Actor
<<include>>
Extend relationship
Boundary
<<extend>>
Cont...
System Boundary
This boundary is clarified by the system boundary
Defines the scope of what a system will be.
The dividing line between the system and its environment
System boundary of a use case diagram defines the limits of the system.
It shown as a rectangle spanning all the use cases in the system
Use cases are within the boundary.
Actors are outside of the boundary.
Cont...
Actor
Model anything that needs to exchange information with the system
Actors are external to the system (physical entities or other system)
Actors interact with the system.
Define roles that users can play but not a specific user.
One user may play many roles
An actor may represent many users.
The different roles the actor represents are the actual business roles of
users in a given system.
Most actors represent user roles, but actors can also be external systems.
An actor is shown as a stick figure in a use case diagram depicted
"outside" the system boundary.
To identify an actor, search in the problem statement for business terms
that portray roles in the system.
Actor classes have actors instances/objects that represent specific actors.
Cont...
Use Case
Represents a class of functionality provided by the system
Describes a function provided by the system that yields a visible
result for an actor.
Visual representation of a distinct business functionality in a system
Actor
System boundary
Cont...
Examples 3:
Use case model:
The set of all use
cases that completely
describe functionality
of the system.
Cont...
Examples 4: On-line Bookstore System
Register
Custome Order
r books
Sell used
books
Review
books
Cont...
Use cases characteristics:
Describe the interactions/dialogs between a system and actors, including
the messages exchanged and the actions performed by the system.
Not the computations the system performs.
Only include actions in which the actor interacts with the computer.
Use cases may be initiated by actors and may involve the participation of
numerous other actors.
Use cases may have extension points that define specific points within an
interaction at which other use cases may be inserted
Use cases classes have use case instances or objects called scenarios that
represent specific interactions.
Be written so as to be as independent as possible from any particular user
interface design.
objective of use case analysis is to model the system:
… how users interact with this system
… when trying to achieve their objectives.
Cont...
Relationship
Represented by directional or non-directional edges
May relate two use cases or two actors, or relate a use case and an actor
May be annotated by stereotypes (constructs that extends the UML
vocabulary and adds new meanings to existing entities)
Association (Connection):
An association between actor and use case
Denoted as solid lines or paths.
Arrowheads may be used to indicate who initiates communication in the
interaction.
Connection does not indicate data flow
Cont...
Includes:
Connection between two use cases
Indicates a use case that is used (invoked) by another use case.
A base use case defines the location at which the inclusion use case is
included.
Denoted as dashed lines with an open arrow-head pointing at the
inclusion use case and are labelled with the <<include>> stereotype.
Cont...
Extends: connection between two use cases
Extends a use case by adding new behavior or actions
Indicates that the base use case may be augmented by the extension use
case; i.e., the inclusion use case will augment the base use case if an
extension condition is satisfied.
A base use case defines the extension point.
Denoted as dashed lines/paths with open arrow-head pointing an extension
use case and labelled with the <<extend>> keyword (stereotype).
Cont...
The <<includes>> Relationship <<includes>> relationship
represents common functionality
needed in more than one use case
<<includes>> behavior is
Passenger factored out for reuse, not
because it is an exception
PurchaseMultiCa The direction of a <<includes>>
rd
PurchaseSingleTicket relationship is to the using use
<<includes>> case (unlike the direction of the
<<includes
>> <<extends>> relationship).
<<extends CollectMoney
>> <<extends>
>
NoChange
Cancel
Cont...
The <<extends>> Relationship <<extends>> relationships model
exceptional or seldom invoked cases
The exceptional event flows are factored
out of the main event flow for clarity
Passenger
The direction of an <<extends>>
relationship is to the extended use case
Use cases representing exceptional flows
PurchaseTicket can extend more than one use case.
<<extends>> <<extends
>>
<<extends>>
<<extends
>>
OutOfOrder TimeOut
Cancel NoChange
Cont...
Sell Item
<<
In c
lud
es>
>
Reorder
<<Includes>>
Sales Clerk
Login
Add to
Stock <<Includes>>
Generate <<Includes>>
Report
Manager
Cont...
Generalization
From specialization to generalized use case
Indicate the specialization use cases are consistent with the generalized
use case and may add additional information.
A specialized use case may be used in place of a generalized use case
and may use any portions of the interaction of generalized use case.
From specialization to generalized Actor
The specialized actor are consistent with the generalized actor and may
add additional information.
A specialized actor may be used in place of a generalized actor and
receives the characteristics of the generalized actor.
Notes:
In both case generalization is denoted as solid lines/paths with a hollow
arrow-head pointing at the generalized use case or generalized actor.
Cont...
Example:
• From specialization to
generalized Actor Library User (Patron)
Extends none
Includes UC-001
Register
<<extend>>
(CustID) Check out
Customer Order books
<<include>>
<<include>>
Sell used Log-in
books
<<include>>
Review books
Cont...
Solution: Sell used books
Main flow of events: -
1. The CUSTOMER clicks the Sell Used Books button on the Home
Page.
2. The system displays the sell used books web page.
3. The CUSTOMER enters the required information on the used books
that he/she wants to sell.
4. The CUSTOMER clicks the SEND button on the webpage.
5. The system displays a confirmation page listing the information that
the CUSTOMER has entered.
6. The CUSTOMER checks that the information displayed are
accurate. If yes, CUSTOMER clicks “OK” button on the web page.
7. The system updates the USED BOOKS table in the database.