0% found this document useful (0 votes)
2 views

Overview of UML

The document provides an overview of the Unified Modeling Language (UML), which is used for visualizing, specifying, constructing, and documenting systems. It outlines the different views of UML models, including logical, process, development, physical, and use case views, as well as the building blocks of UML such as structural, behavioral, grouping, and annotational elements. Additionally, it discusses the relationships within UML, including dependency, association, generalization, aggregation, and composition.

Uploaded by

Enstain Ford
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Overview of UML

The document provides an overview of the Unified Modeling Language (UML), which is used for visualizing, specifying, constructing, and documenting systems. It outlines the different views of UML models, including logical, process, development, physical, and use case views, as well as the building blocks of UML such as structural, behavioral, grouping, and annotational elements. Additionally, it discusses the relationships within UML, including dependency, association, generalization, aggregation, and composition.

Uploaded by

Enstain Ford
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Chapter Two-Part I

Overview of Unified Modeling Language


(UML)

Sunday, October 27, 2024

1
Overview of UML

• Unified Modeling Language (UML) is a language for:


o Visualizing
o Specifying
• UML is made up of
o Constructing
o Documenting o Pseudo-code,
o Actual code,
o Pictures,
o Diagrams , or
o Long passages of description.

Sunday, October 27, 2024 2


•The elements that make up a modelling language are called notation.
•UML is a general purpose visual modelling language for systems.
•System development in UML focuses on three different models of the system:
 The functional model
 The object model
 The dynamic model

Sunday, October 27, 2024 3


Views of Model

Logical Process
View View
•UML model diagrams breaks into perspectives or views.
Use Case
•Philippe Kruchten's 4+1 view model help the system View
developers to show how each diagram type plays a part
Development Physical
in the overall model. View
View

Sunday, October 27, 2024 4


className Object : className

+Attribute1
Logical view:
+Attribute2
+Attribute3 • Describe the abstract descriptions of a system's parts.
+Operation1()
+Operation2()
+Operation3() Object • Used to model what a system is made up of and how the parts
stateName

Class interact with each other.

State machine • The types of UML diagrams that typically make up this view
Object1 Object2 Object3

Object1
1 : message 1()
include:
Object2
2 : message 2()

3 : messsage 3()
o Class
Object3
4 : message 4() o Object
o State machine
a) Collaboration diagram b) Sequence diagram
Interaction diagrams o Interaction diagrams.
Sunday, October 27, 2024 5
Process view:

• Describe the processes within the system.

• It is particularly helpful when visualizing what must


happen within the system.

• This view typically contains activity diagrams.

Sunday, October 27, 2024 6


Development view:

• Describes how your system's parts are


organized into modules and components.

• It is very useful to manage layers within


your system's architecture.

• This view typically contains package and


component diagrams.
Package diagram Component diagram

Sunday, October 27, 2024 7


Physical view:

• Describes how the system's design, as described in the


three previous views, is then brought to life as a set of
real-world entities.

• The diagrams in this view show how the abstract parts


map into the final deployed system.

• It is showed in Deployment diagram.

Sunday, October 27, 2024 8


Use case view:
• Describe the functionality of the system being
modelled from the perspective of the outside world.
• It describes what the system is supposed to do.
• All 4 views rely on the use case view to guide them
that's why the model is called 4+1.
• This view typically contains use case diagrams,
descriptions, and overview diagrams.

Sunday, October 27, 2024 9


Why Unified?

•UML attempts in being unified across several different domains.


o Development lifecycle
o Application domains
o Implementation languages and platforms:
o Development processes
o Its own internal concepts
•There are two aspects to a UML model.
o Static model
o Dynamic model

Sunday, October 27, 2024 10


o Static structure:- This describes

 What types of objects are important for modelling the system.

 How they are related.

o Dynamic behaviour:-This describes

 The lifecycles of these objects

 The collaboration of the object to deliver the required system functionality.

•These two aspects of the UML model go hand-in-glove, and one is not truly complete without the other.

Sunday, October 27, 2024 11


Where Can be UML used?
•The UML is intended primarily for software-intensive systems. It has been used effectively
for such domains as
o Enterprise information systems
o Banking and financial services
o Telecommunications
o Transportation
o Defence/aerospace
o Retail
o Medical electronics Scientific
o Distributed Web-based services
Sunday, October 27, 2024 12
Building Blocks of UML
• These are the abstractions that are first- •The vocabulary of the UML

class citizens in a model. encompasses three kinds of building


blocks:

• Used to group interesting


collections of things
• Are tie these things together.
car person
Example:
o Student has a Book
student book o Person has a Car

Sunday, October 27, 2024 13


Things:
• There are four kinds of things in the UML:
o Structural things
o Behavioural things
o Grouping things
o Annotational things
• These things are the basic object-oriented building blocks of the UML.

Sunday, October 27, 2024 14


Structural Things:

• Structural things are the nouns of UML models.

• These are the mostly static parts of a model, representing elements that
are either conceptual or physical.

• Collectively, the structural things are called classifiers

Sunday, October 27, 2024 15


•The structural things are the following:
o Class
o Interface
o Collaboration
o Use case
o Active class
o Component
o Artifact
o Node

Sunday, October 27, 2024 16


Class:

• A set of objects that share the same attributes, operations,


relationships, and semantics. Window
+size
• A class implements one or more interfaces.
+origin
• Graphically, a class is rendered as a rectangle including its +display()
+close()
Name, Attributes, Operations +move()
+open()

Sunday, October 27, 2024 17


Interface:

•An interface is a collection of operations that specify a service


of a class or component.

•An interface therefore describes the externally visible


behaviour of that element.

•The declaration of an interface looks like a class with the


keyword «interface» above the name; attributes are not
relevant, except sometimes to show constants.

Sunday, October 27, 2024 18


Collaboration:
• A collaboration defines an interaction and is a society of roles
and other elements that work together.
• Collaborations have structural, as well as behavioural,
dimensions.
• A given class or object might participate in several
collaborations.

Sunday, October 27, 2024 19


Use Case:
• A use case is a description of sequences of actions that a system performs that
yield observable results of value to a particular actor.
• A use case is used to structure the behavioural things in a model.
• A use case is realized by a collaboration.

process psyment
login insert PIN

Sunday, October 27, 2024 20


Active Class:
• An active class is a class whose objects own one or
more processes or threads and therefore can initiate
control activity.
• An active class is just like a class except that its objects
represent elements whose behaviour is concurrent with
other elements.

Sunday, October 27, 2024 21


order product customer

Component:
• A component is a modular part of the system design that
hides its implementation behind a set of external interfaces.
• Within a system, components sharing the same interfaces can component name
be substituted while preserving the same logical behaviour.
• The implementation of a component can be expressed by
wiring together parts and connectors; the parts can include
smaller components.

Sunday, October 27, 2024 22


<<artifact>>
Artifact: artifactName

•An artifact is a physical and replaceable part of a


system that contains physical information ("bits").
•In a system, you'll encounter different kinds of <<artifact>>
deployment artefacts, such as source code files, windows.dll

executable, and scripts.


•An artefact typically represents the physical packaging <<artifact>>
of source or run-time information. cmd.exe

Sunday, October 27, 2024 23


Node: nodeName
• A node is a physical element that exists at run time.

• It represents a computational resource, generally having at


least some memory and, often, processing capability.
server :webServer
• A set of components may reside on a node and may also
migrate from node to node.

Sunday, October 27, 2024 24


Behavioural Things:
•Behavioural things are the dynamic parts of UML models.
•These are the verbs of a model, representing behaviour
over time and space.
• In all, there are three primary kinds of behavioural things.
1. Interaction
2. State machine
3. Activity

Sunday, October 27, 2024 25


idle message shutdown
Interaction:
• It is a behaviour that comprises a set of messages exchanged
among a set of objects.
• The behaviour of a society of objects or of an individual
operation may be specified with an interaction.
idle send request shutdown
• An interaction involves a number of other elements, including
messages, actions, and connectors.

Sunday, October 27, 2024 26


State Machine:
stateMachineName
•A state machine is a behaviour that specifies the sequences of states
an object or an interaction goes through during its lifetime in
response to events, together with its responses to those events.

• The behaviour of an individual class or a collaboration of classes


may be specified with a state machine.
idle
shutdown
•A state machine involves a number of other elements, including

o States , transitions (the flow from state to state).

o Events (things that trigger a transition), and pending

o Activities (the response to a transition).


Sunday, October 27, 2024 27
Activity:
•An activity is a behaviour that specifies the sequence of steps a activityName
computational process performs.
• In an interaction, the focus is on the set of objects that interact.
Reading Letter
•In a state machine, the focus is on the life cycle of one object at a time.

•In an activity, the focus is on the flows among steps without regard to
Saving File
which object performs each step.

•A step of an activity is called an action.

•States and actions are distinguished by their different contexts. Writting code

Sunday, October 27, 2024 28


packageName Order

Grouping Things:
• Grouping things are the organizational parts of UML models.
• There is one primary kind of grouping thing, namely,
packages.
• A package is a general-purpose mechanism for organizing the
design itself.
• Structural things, behavioural things, and even other grouping
things may be placed in a package.
• Packages are very useful in managing models

Sunday, October 27, 2024 29


Machine Course Body
MotherBoard
+machineNumber
#motherboardId
+Model
+type
+color Computer
+serialNumber
+model Degree
+type Processor Heart Leg

Relationships:
• There are four kinds of relationships in the UML:
Course
Department 1.Dependency
+courseCode
+CourseTitle Student #deptId
+deptName
2.Association
+CreditHour +StdId
+Name 3.Generalization
+sex
-viewGrade() 4.Realization
+sendComments()
+enrolled() • These relationships are the basic relational building
blocks of the UML.

Sunday, October 27, 2024 30


Dependency: Generalization:

• It is a specialization/generalization relationship.
• It is a semantic relationship between two model
elements. • The specialized element (the child) builds on the
specification of the generalized element (the
• A change to one element (the independent one) may
parent).
affect the semantics of the other element (the
dependent one). • The child shares the structure and the behaviour
of the parent.

Sunday, October 27, 2024 31


Aggregation:
Association: • It is a special kind of association,
• It is a structural relationship among classes representing a structural relationship
that describes a set of links. between a whole and its parts.
• A link being a connection among objects that
are instances of the classes.
Composition:
• It is a "strong" form of aggregation.

Sunday, October 27, 2024 32


THANK YOU!!!

Sunday, October 27, 2024 33

You might also like