Object-Oriented Software Engineering: UNIT 03: Unified Modeling Language
Object-Oriented Software Engineering: UNIT 03: Unified Modeling Language
Object-Oriented Software Engineering: UNIT 03: Unified Modeling Language
SOFTWARE ENGINEERING
UNIT 03 : Unified Modeling Language
Structural things
Behavioral things
Grouping things
Annotational things
THINGS
Structural things
Structural components, the noun part of models
Class – set of objects e.g. Sensor
Interface – externally visible behavior of an element
that specify a service of a class or component
Collaboration
Use case
Active classes, components, and nodes
THINGS
Structural things
Class – set of objects e.g. Sensor
Sensor
-name
-value
-time_stamp
+powerUp()
+calibrate()
+readSensor()
+setInterval()
THINGS
Structural things
Interface – externally visible behavior of an element that
specify a service of a class or component
Interface defines only the specifications not the
implementations!
IReadSensorData
THINGS
Structural things
Collaboration – specify structure and behavior of
collaboration between entities
We visualise such collaborations in use-case diagrams and
activity diagrams.
Init
Sensor
THINGS
Structural things
Use case – specify description of set of sequence of actions
Used to structure the behavioral things
Realised by a collaboration
Request
data
THINGS
Structural things
Active class – a class that its objects represent elements
whose behavior is concurrent with other elements.
EventManager
+start()
+stop()
+flush()
THINGS
Structural things
Component – physical and replaceable part that represents
the packaging of logical elements such as classes, interfaces
and collaborations.
COM+, Java Beans etc.
sensordata.java
THINGS
Structural things
Node – exists at runtime and represents a computational
resource
Contains a set of components
WebServer
THINGS
Structural things
Structural components, the noun part of models
Class – set of objects e.g. Sensor
Interface – externally visible behavior of an element
that specify a service of a class or component
Collaboration
Use case
Active classes, components, and nodes
THINGS
Behavioral things
Represent dynamic components in UML models, the
verb part of UML models
Two types;
– Interaction
– State machine
THINGS
Behavioral things
Interaction – messages passed between/among components
display
THINGS
Behavioral things
State machine – specifies the sequence of states an object or
an interaction goes through during its lifetime in response to
events
Waiting
THINGS
Grouping things
Packages – organise elements into groups
Conversion rules
THINGS
Annotational things
Notes – explanatory parts of UML model
regex for
formatting
RELATIONSHIPS
Relationships in UML
Dependency
Association
Generalisation
Realisation
RELATIONSHIPS
Relationships in UML
Dependency – shows semantic relationship between two
things in which a change to one thing (independent) may
affect the semantics of the other (dependent)
RELATIONSHIPS
Relationships in UML
Association – shows links among objects along with labels
and multiplicity
0..1 *
weather station sensor
RELATIONSHIPS
Relationships in UML
Generalisation – shows generalisation/specialisation
relationships in which objects of specialised element (the
child) are substitutable for objects of generalised element (the
parent)
RELATIONSHIPS
Relationships in UML
Realisation – semantic relationship between classifiers.
Used between interfaces and classes or components that
realise them, and between use cases and the collaborations that
realise them.
UNIT 03: Object Orientation Fundamentals and UML
Graphical representation
Deployment diagrams
Use case diagrams
of a set of elements Activity diagrams
Class diagrams
Different combination of Sequence diagrams
Interaction overview diagrams
elements serve different Composite structure diagrams
purpose
State machine diagrams
Timing diagrams
Object diagrams
Communication diagrams
Process segments