Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
32 views59 pages

UML Diagrams for System Design

Uploaded by

kuttikiran2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views59 pages

UML Diagrams for System Design

Uploaded by

kuttikiran2004
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 59

Exercise

Develop Use Case Diagram Hydroponics Gardening System


1

Problem Statement: Identify Use Cases and develop the Use Case Diagram for Hydroponics
Gardening System.

Procedure:

Use case Diagram:

A use case diagram is a graphical representation of a user's possible interactions with a system. A
use case diagram shows various use cases and different types of users and the system. The use
cases are represented by either circles or ellipses.

System

The system boundaries are drawn using a rectangle that


contains use cases. Place actors outside the systems
boundaries

Use Case

Draw use cases using ovals. Label the ovals with verbs that represent the
systems functions

Actor

Actors or users are the entities that interact with the system. Actors represent the role the user
play with the system.

Relationships

a) Associations: An association represents a


structural relationship that connects two
classifiers such as classes or use cases.

1
b) Generalization: A generalization relationship is used to represent inheritance
relationship between model elements of same type.

c) <<include>> This is a relationship in which one use case (the base use case) includes
the functionality of another use case (the inclusion use case). The include relationship
supports the reuse of functionality in a use-case model.

d) <<extend>>Extend relationship to specify that one use case (extension) extends the
behavior of another use case (base). This type of relationship reveals details about a
system or application that are typically hidden in a use case.

2
Output

3
Exercise Use case Diagram to return a book with fine in Library
2 Management System

Problem Statement: Demonstrate a use case for returning book with fine for library system.

Procedure:

Use case Diagram:

A use case diagram is a graphical representation of a user's possible interactions with a system. A
use case diagram shows various use cases and different types of users and the sytem. The use
cases are represented by either circles or ellipses.

System

The system boundaries are drawn using a rectangle that


contains use cases. Place actors outside the systems
boundaries

Use Case

Draw use cases using ovals. Label the ovals with verbs that represent the
systems functions

Actor

Actors or users are the entities that interact with the system. Actors represent the role
the user play with the system.

Relationships

a) Associations: An association represents a


structural relationship that connects two
classifiers such as classes or use cases.

4
b) Generalization: A generalization relationship is used to represent inheritance
relationship between model elements of same type.

c) <<include>> This is a relationship in which one use case (the base use case) includes
the functionality of another use case (the inclusion use case). The include relationship
supports the reuse of functionality in a use-case model.

d) <<extend>>Extend relationship to specify that one use case (extension) extends the
behavior of another use case (base). This type of relationship reveals details about a
system or application that are typically hidden in a use case.

5
Output

6
Exercise
Class Diagram for the Environmental Control System
3

Problem Statement: Demonstrate Class Diagram for the Environmental Control System

Procedure:

Class Diagram

Class diagrams are fundamental to the object modeling process and model the static structure of
a system. These are the blueprints of your system or subsystem.

Basic Notations and Symbols

Classes represent abstractions of entities with common characterstics. Associations represent


the relationships between classes. Illustration of classes is divided into three compartments.
Name of the class on top of the compartment, second compartment includes attributes and third
compartment has operations as shown below.

Class Visibility

The +, - and # symbols before an attribute and operation name in a class denote the visibility of
the attribute and operation.

7
 + denotes public attributes or operations
 - denotes private attributes or operations
 # denotes protected attributes or operations

Associations

Associations represent static relationships between classes. Place association names above on or
below the association line. Use a filled arrow to indicate the direction of relationship. Place
roles near the end of an association. Roles represent the way the two classes see each other.

Aggregation and composition

 Aggregation: Implies IS-A relationship that where the child can exist independently of
the parent. Example: Class (parent) and Student (child). Delete the Class and the Students
still exist.

 Composition: Implies HAS- A relationship where the child cannot exist independent of
the parent. Example: House (parent) and Room (child). Rooms don't exist separate to a
House.

8
Generalization

Generalization is a mechanism for combining similar classes of objects into a single, more
general class. Generalization identifies common among a set of entities. The commonness may
be of attributes, behavior, or both. In other words, a superclass has the most general attributes,
operations, and relationships that may be shared with subclasses.

Specialization: is the reverse process of Generalization means creating new sub-classes from an
existing class.

9
Output

10
Exercise
Object Diagram for the Library Management System
4

Problem Description: Demonstrate Object Diagram for the library management system.

Procedure

Object Diagram:

 An object diagram may be considered a special case of a class diagram


 Object diagrams emphasize the relationship between instances of classes at some point in
time
 Object is shown by a rectangular with classifier name in the center f rectangular and
under line
 Object diagram shows complex relationship between classes
 It is useful if we feel classes as more abstract

Basic notations and Symbols

Object Name: Every object is actually symbolized like a rectangle, that offers the name from the
object and its class underlined as well as divided with a colon.

Object Attributes:

Similar to classes, we can list object attributes inside a separate compartment. However,
unlike classes, object attributes should have values assigned for them.

Links:

 A link relationship is also an instance of a communication path


between two nodes
 Links tend to be instances associated with associations. You
can draw a link while using the lines utilized in class diagrams.

11
Dependency Relationship

A dependency relationship is a relationship in which one element, the client, uses or depends on
another element.

Type of Keyword or
dependency Stereotype Description
Abstraction «abstraction», Relates two model elements, or sets of model elements,
«derive», «refine», or that represent the same concept at different levels of
«trace» abstraction, or from different viewpoints
Binding «bind» Connects template arguments to template parameters to
create model elements from templates
Realization «realize» Indicates that the client model element is an
implementation of the supplier model element, and the
supplier model element is the specification
Substitution «substitute» Indicates that the client model element takes the place of
the supplier; the client model element must conform to
the contract or interface that the supplier model element
establishes
Usage «use», «call», Indicates that one model element requires another model
«create», element for its full implementation or operation
«instantiate», or
«send»

12
Deploy Relationships

Deploy relationships specify that


a particular node type supports the
deployment of an artifact type.

13
Output

14
Exercise
Activity Diagram for Hydrophonics Gardening System
5

Problem Description: Demonstrate Activity Diagram for Hydrophonics Gardening System

Procedure:

Activity Diagram: Activity diagram provides a view of the behavior of a system by describing
the sequence of actions in a process. Activity diagrams are similar to flowcharts because they
show the flow between the actions in an activity.

In activity diagrams, you use activity nodes and activity edges to model the flow of control and
data between actions.

Notations and Symbols

Initial State or Start Point

A small filled circle followed by an arrow represents the initial action state or the start point for
any activity diagram. For activity diagram using swim lanes, make sure the start point is placed
inthe top left corner of the first column.

Activity or Action State

An action state represents the non-interruptible action of objects. You can draw an action state in
using a rectangle with rounded corners.

Action Flow

Action flows, also called edges and paths, illustrate the transitions from one action state to
another. They are usually drawn with an arrowed line.

15
Object Flow

Object flow refers to the creation and modification of objects by activities. An object flow arrow
from an action to an object means that the action creates or influences the object. An object flow
arrow from an object to an action indicates that the action state uses the object.

Decisions and Branching

A diamond represents a decision with


alternate paths. When an activity
requires a decision prior to moving on
to the next activity, add a diamond
between the two activities. The
outgoing alternates should be labeled
with a condition or guard expression.
You can also label one of the paths "else."

Synchronization

 A fork node is used to split a


single incoming flow into
multiple concurrent flows. It
is represented as a straight,
slightly thicker line in an
activity diagram.
 A join node joins multiple
concurrent flows back into a
single outgoing flow.
 A fork and join mode used
together are often referred to
as synchronization.

16
Time Event

This refers to an event that stops the flow for a time; an hourglass depicts it.

Merge Event

A merge event brings together multiple flows that are not concurrent.

Final State or End Point

An arrow pointing to a filled circle nested inside another circle represents the final action state.

17
Output

18
Exercise
Sequence Diagram for Environment Control System
6

Problem Description: Demonstrate Sequence Diagram for Environment Control System

Procedure:

System Sequence Diagram (SSD) or Sequence Diagram

A sequence diagram is a type of interaction diagram because it describes how—and in what


order—a group of objects works together. These diagrams are used by software developers and
business professionals to understand requirements for a new system or to document an existing
process.

Notations and Symbols

Actors – An actor in a UML diagram represents a type of role where it interacts


with the system and its objects. It is important to note here that an actor is always
outside the scope of the system we aim to model using the UML diagram.

Life Line: A lifeline is a named element which


depicts an individual participant in a sequence
diagram. Each instance in a sequence diagram is
represented by a lifeline. Lifeline elements are located
at the top in a sequence diagram.

The standard in UML for naming a lifeline follows


the following format – Instance Name : Class Name

Messages – Communication between objects is depicted using messages. The messages appear
in a sequential order on the lifeline. We represent messages using arrows. These messages are
classified into two types

a) Synchronous Message: A
synchronous message waits for a
reply before the interaction can
move forward. The sender waits
until the receiver has completed
the processing of the message.

19
b) Asynchronous Message: An
asynchronous message does not wait for
a reply from the receiver. The
interaction moves forward irrespective
of the receiver processing the previous
message or not.

Create message – We use a Create message to instantiate a new object in the sequence diagram..

Delete Message – We use a Delete Message to delete an object. When an object is deallocated
memory or is destroyed within the system we use the Delete Message symbol. It destroys the
occurrence of the object in the system

20
Self Message – Certain scenarios might arise where the object needs to send a message to itself.

Reply Message – Reply messages are used


to show the message being sent from the
receiver to the sender.

Found Message – A Found message is used to represent a


scenario where an unknown source sends the message

21
Output

22
Exercise Sequence Diagram for Return and Remove Books in
7 Library Management System

Problem Description: Demonstrate Sequence Diagram for Environment Control System

Procedure:

System Sequence Diagram (SSD) or Sequence Diagram

A sequence diagram is a type of interaction diagram because it describes how—and in what


order—a group of objects works together. These diagrams are used by software developers and
business professionals to understand requirements for a new system or to document an existing
process.

Notations and Symbols

Actors – An actor in a UML diagram represents a type of role where it interacts


with the system and its objects. It is important to note here that an actor is always
outside the scope of the system we aim to model using the UML diagram.

Life Line: A lifeline is a named element which


depicts an individual participant in a sequence
diagram. Each instance in a sequence diagram is
represented by a lifeline. Lifeline elements are located
at the top in a sequence diagram.

The standard in UML for naming a lifeline follows


the following format – Instance Name : Class Name

Messages – Communication between objects is depicted using messages. The messages appear
in a sequential order on the lifeline. We represent messages using arrows. These messages are
classified into two types

a) Synchronous Message: A
synchronous message waits for a
reply before the interaction can
move forward. The sender waits
until the receiver has completed
the processing of the message.

23
b) Asynchronous Message: An
asynchronous message does not wait for
a reply from the receiver. The
interaction moves forward irrespective
of the receiver processing the previous
message or not.

Create message – We use a Create message to instantiate a new object in the sequence diagram..

Delete Message – We use a Delete Message to delete an object. When an object is deallocated
memory or is destroyed within the system we use the Delete Message symbol. It destroys the
occurrence of the object in the system

24
Self Message – Certain scenarios might arise where the object needs to send a message to itself.

Reply Message – Reply messages are used


to show the message being sent from the
receiver to the sender.

Found Message – A Found message is used to represent a


scenario where an unknown source sends the message

25
Output

26
Exercise
Communication Diagram for Hydrophonics Gardening System
8

Problem Description: Draw the communication Diagram for the Hydrophonics Gardening
System

Procedure:

Communication Diagram

A communication diagram is a type of UML interaction diagram that illustrates the flow of
messages between the objects in an interaction. You can add and modify lifelines, message
pathways, and messages in communication diagrams

 Communication diagrams are a type of interaction diagram that you can use to explore
the dynamic behavior of a system or software application.
 They provide an alternate view of the same information as sequence diagrams
 In sequence diagrams, the focus is the ordering of the messages over time;
 In communication diagrams the focus is the structure of the messages that pass between
the objects in the interaction
 These diagrams illustrate the flow of messages between objects and the implied
relationships between classes.
We can use communications diagrams to explore how objects in a system or application work
together. Communication diagrams can identify the following aspects of an interaction or task:

 Objects that participate in the interaction


 Interfaces that the participating classes require
 Structural changes that an interaction requires
 Data that is passed between the objects in an interaction

Notations and Symbols

Interaction frames
In sequence diagrams and communication diagrams,
an interaction frame provides a context or boundary to
the diagram in which you create diagram elements,
such as lifelines or messages, and in which you
observe behavior.

As the following figure illustrates, an interaction


frame is displayed as a rectangular area with a heading
label, or pentagon descriptor figure, in the top left corner.

27
The frame and its contents represent an interaction in a sequence diagram or communication
diagram. The heading label of the interaction frame is the name of the interaction that the
diagram represents. In sequence diagrams, a frame can represent combined fragments, which
represent scenario constructs, and interaction uses, which represent an interaction within an
interaction.

Lifelines in communication diagrams

As the following figure illustrates, a lifeline in a communication diagram is represented by a


rectangle that contains the instance name and the type.

Message pathways in communication diagrams


In communication diagrams, a message pathway is a connector between the roles or objects
represented by lifelines in the diagram. The pathway identifies the objects that can pass messages
in the interaction.

. Messages – Communication between objects is depicted using messages. The messages appear
in a sequential order on the lifeline. We represent messages using arrows. These messages are
classified into two types

a) Synchronous Message: A
synchronous message waits for a
reply before the interaction can
move forward. The sender waits
until the receiver has completed
the processing of the message.

b) Asynchronous Message: An
asynchronous message does not
wait for a reply from the receiver. The
interaction moves forward irrespective
of the receiver processing the previous
message or not.

28
Create message – We use a Create message to instantiate a new object in the sequence diagram..

Delete Message – We use a Delete Message to delete an object. When an object is deallocated
memory or is destroyed within the system we use the Delete Message symbol. It destroys the
occurrence of the object in the system

29
Self Message – Certain scenarios might arise where the object needs to send a message to itself.

Reply Message – Reply messages are used to show the message being sent from the receiver to
the sender.

Found Message – A Found message is used to represent a scenario where an unknown source
sends the message

30
Output

31
Exercise
Interaction Diagram for Library Management System
9

Problem Description: Draw the Interaction Diagram for Library Management System

Procedure:

Interaction Overview Diagram

An interaction overview diagram is a form of activity diagram in which the nodes represent
interaction diagrams. Interaction diagrams can include sequence, communication, interaction
overview and timing diagrams. Most of the notation for interaction overview diagrams is the
same for activity diagrams. For example, initial, final, decision, merge, fork and join nodes are
all the same. However, interaction overview diagrams introduce two new elements: interaction
occurrences and interaction elements.

Notations and Symbols

Interaction occurrence

Sometimes referred to as “interaction use”. Used to refer to the


contents of existing interaction diagrams. Can be identified as a box
with “ref’ in the corner.

Interaction element

Sometimes referred to simply as an “interaction”. Used to display any kind of interaction


diagram.

Initial

The beginning of a work-flow.

32
Note

Used to include notes for other users that can’t be communicated within the diagram itself.

Activity/Action

A round box used to illustrate the occurrence of an action or event.

Decision or Merge/Branch

A diamond symbol used when there are at least two alternate paths for the user to choose from.

Action/Control Flow

Shown by an arrow connecting one action box to another.

33
Fork/Join

 Used to split one activity flow into two or more concurrent activities.
 Used to join multiple concurrent activities into one or multiple outgoing flows.

Flow final

The end of a specific process flow, but not the end of all activity.

End

Completion of all process flows.

34
Output

35
Exercise Composite Structure Diagram for Water Tank
10 (Hydrophonics Gardening System)

Problem Description: Draw the Composite Structure Diagram for Hydrophonics Gardening
Systems Water Tank.

Procedure:

Composite Structure Diagram

Composite Structure Diagrams show the internal parts of a class. Parts are named:
partName:partType[multiplicity]. Aggregated classes are parts of a class but parts are not
necessarily classes, a part is any element that is used to make up the containing class.

Notations and Symbols

Composite structure diagram symbols


The Composite Structure Diagram is a UML 2.0 diagram that is useful for modeling the
decomposition of structured classes (Classes, Data Types, Interfaces and Signals) through Parts
and Ports, and the flow of information between those Parts and Ports.
.
The Composite Structure Diagram can show Actors, Associations, Classes, Data Types,
Dependencies, Interfaces, IO Flows, Parts, Ports, Interface Classes, IO Flows and Signals.

36
Actor
A Composite Structure Diagram shows Actors as top-level items using the following notation.

Association
You can add Associations (typically called connectors on a Composite Structure Diagram)
between Classes, Data Types, Interfaces, Signals, Parts, Ports and Actors on a Composite
Structure Diagram. When you create an Association on a Composite Structure Diagram, the
Association is created between each item in the context of its containing items.

Class
A Composite Structure Diagram shows Classes as top-level items using the following notation.

The main compartment of a Class can contain Parts and its boundary can include Ports.

Data Type
A Composite Structure Diagram shows Classes as top-level items using the following notation.

The main compartment of a Data Type can contain Parts and its boundary can include Ports.
You can add Dependencies between Classes, Data Types, Interfaces, Signals, Parts and Ports on
a Composite Structure Diagram.

Interface

A Composite Structure Diagram shows Interfaces as top-level items using the following
notation.

The main compartment of a Data Type can contain Parts and its boundary can include Ports.
In addition, Interfaces can be shown as provided Interface Classes (lollipops) and required
Interface Classes (cups) that are dependent on Classes, Data Types, Interfaces and Signals, Parts
and Ports.

37
IO Flow
A Composite Structure Diagram can show an IO Flow as an IO Flow Link between items using
the following notation.

When an IO Flow is realized by an Association, a Composite Structure Diagram can show the IO
Flow on the Association using the following notation.

Part
A Part is a Role or an Attribute with a Basic Type, Class, Data Type, Interface, Signal or Type
Definition set as its data type) in the context of a top-level Class, Data Type, Interface or Signal,
and its contained Parts and Ports.
A Part appears on a Composite Structure Diagram as a box or a box with a compartment.
Non-composite Parts have a dashed outline. A Part has a compartment when it shows contained
Parts or Ports.

Port
A Port is an aggregate Role or Attribute (with a Basic Type,
Class, Data Type, Interface, Signal or Type Definition set as
its data type) set up as a Port in the context of a top-level
Class,
Data Type, Interface or Signal, and its contained Parts and
Ports.
An aggregate Role or Attribute is set up as a Port by
selecting the Port check box on its Property Pages.

38
A Port appears on a Composite Structure Diagram as a box on the boundary of a Class, Signal,
Part or Port. Non-composite Parts have a dashed outline.

Signal
A Composite Structure Diagram shows Signals as top-level items using the following notation.

39
Output

40
Exercise Timing Diagram for the value object to fill the
11 Water Storage Tank

Problem: Draw the Timing Diagram for a value object that is controlled to fill the Water Storage
Tank object in Hydro phonics Gardening System.

Procedure

Timing diagrams are used to display the change in state or value of one or more elements over
time. A state lifeline shows the change of state of an item over time. The X-axis displays
elapsed time in whatever units are chosen. The Y-axis is label with a given list of states.

Notations and Symbols

Lifeline

It is a named element which represents an individual participant


in the interaction. While parts and structural features may have
multiplicity greater than 1, lifelines represent only one interacting
entity. See lifeline from sequence diagrams for details.

Lifeline on the timing diagrams is represented by the name of


classifier or the instance it represents. It could be placed inside
diagram frame or a "swimlane".

State or Condition Time Lime

Timing diagram could show states of the participating classifier or attribute, or some testable
conditions, such as a discrete or enumerable value of an attribute.

41
Duration Constraint

Duration constraint is an interval constraint that refers to a duration interval. The duration
interval is duration used to determine whether the constraint is satisfied.

Duration constraint is shown as some graphical association between a duration interval and the
constructs that it constrains.

Time Constraint

Time constraint is an interval constraint that refers to a time interval. The time interval is time
expression used to determine whether the constraint is satisfied.

Time constraint is shown as graphical association between a time interval and the construct that
it constrains. Typically this graphical association is a small line, e.g., between an occurrence
specification and a time interval.

Destruction Occurrence

Destruction occurrence is a message occurrence


which represents the destruction of the instance
described by the lifeline. It may result in the
subsequent destruction of other objects that this
object owns by composition. No other occurrence
may appear after the destruction event on a given
lifeline.

The destruction event is depicted by a cross in the form of an X at the end of a timeline.

42
Output

43
Exercise
State Machine Diagram for the Duration Timer
12

Problem Description: Draw the State Machine Diagram for the Duration Timer.

Procedure:

State Diagram or State Chart Diagram

A state diagram shows the behavior of classes in response to external stimuli. Specifically a state
diagram describes the behavior of a single object in response to a series of events in a system.
Sometimes it's also known as a Harel state chart or a state machine diagram. This UML diagram
models the dynamic flow of control from state to state of a particular object within a system

Notations and Symbols

States
States represent situations during the life of an object. You can easily illustrate a state in
SmartDraw by using a rectangle with rounded corners.

Transition
A solid arrow represents the path between different states of an object. Label the transition with
the event that triggered it and the action that results from it. A state can have a transition that
points back to itself.

44
Initial State
A filled circle followed by an arrow represents the object's initial state.

Final State
An arrow pointing to a filled circle nested inside another circle represents the object's final state.

Decision

It is used in UML to support conditionals in activities.

History refers to the development of object-oriented methods and notation.

Constraint is an extension mechanism that enables you to refine the semantics of a UML model
element.

45
Synchronization and Splitting of Control
A short heavy bar with two transitions entering it represents a synchronization of control. The
first bar is often called a fork where a single transition splits into concurrent multiple transitions.
The second bar is called a join, where the concurrent transitions reduce back to one.

46
Output

47
Exercise
Component Diagram for Environment Control System
13

Problem Description: Demonstrate Component Diagram for the Environment Control System

Procedure

Component Diagrams

Component diagrams are used to visualize the organization of system components and the
dependency relationships between them. They provide a high-level view of the components
within a system.

Component Diagram Symbols

We have explained below the common component diagram notations that are used to draw a
component diagram.

Component

There are three ways the component symbol


can be used.

1) Rectangle with the component stereotype


(the text <<component>>). The component
stereotype is usually used above the
component name to avoid confusing the
shape with a class icon.

2) Rectangle with the component icon in the


top right corner and the name of the
component.

48
3) Rectangle with the component icon and the component
stereotype.

Provided Interface and the Required Interface

Interfaces in component diagrams show how components are wired together and interact with
each other. The assembly connector allows linking the component’s required interface
(represented with a semi-circle and a solid line) with the provided interface (represented with a
circle and solid line) of another component. This shows that one component is providing the
service that the other is requiring.

Port

Port (represented by the


small square at the end of
a required interface or
provided interface) is
used when the component
delegates the interfaces to
an internal class.

49
Dependencies

Although you can show more detail about the relationship between two components using the
ball-and-socket notation (provided interface and required interface), you can just as well use a
dependency arrow to show the relationship between two components.

50
Output

51
Exercise
Package Diagram for Hydrophonics Gardening System
14

Problem Description: Demonstrate Package Diagram for Hydrophonics Gardening System

Procedure

Package Diagram

Packages group related model elements of all types, including other packages. Packages also
represent namespaces, which means that the model elements within a package must have unique
names.

You can use packages in several diagrams, including class, component, and use-case diagrams.
Each package has a unique name that describes its content.

Notations and Symbols

Package

A package is displayed as a rectangle with a tab in the upper-left corner. The rectangle contains
the name of the package and the package icon.

Members of Package within in Package

Members of the package may be shown


within the boundaries of the package. In
this case the name of the package should
be placed on the tab

52
Members of Package outside the package

Members of the package may be shown outside of


the package by branching lines from the package to
the members. A plus sign (+) within a circle is
drawn at the end attached to the namespace
(package).

Visibility of Package

If an element that is owned by a package has visibility, it could be only


public or private visibility. Protected or package visibility is not
allowed. The visibility of a package element may be indicated by
preceding the name of the element by a visibility symbol ("+" for
public and "-" for private).

Element Import

Public: The imported element will be


added to the namespace and made visible
outside the namespace. Keyword «import»
indicates public element import.

Private: the imported element will be added


to the namespace but will not be visible
outside the namespace. Keyword «access»
indicates private element import.

53
Package Import

It is shown using a dashed arrow with an open


arrowhead from the importing namespace to the
imported package. By default, the value of
visibility is public, so it is the same as
«import».

Public: The imported elements will be added to


the namespace and made visible outside the
namespace. Keyword «import» indicates public
package import.

Private: The imported elements will be added to


the namespace but will not be visible outside the
namespace. Keyword «access» indicates private
package import.

Package Merge

A package merge is a directed relationship between two


packages that indicates that content of one package is
extended by the contents of another package.

Package merge is shown using a dashed line with an


open arrowhead pointing from the receiving package to
the merged package. Keyword «merge» is shown near the
dashed line.

54
Model : Model is a package which captures a view of a system.
Model is notated using the ordinary package symbol (a folder icon)
with a small triangle in the upper right corner of the large rectangle.

Service Layer Model: the model are shown


within the large rectangle, the triangle may be
drawn to the right of the model name in the tab.

Sterotyped Model in Layered Service

Model could be notated as a package with the


keyword «model» placed above the name of the
model.

55
Output

56
Exercise
Deployment Diagram for Environmental Control System
15

Problem Description: Demonstrate Deployment Diagram for Environment Control System

Procedure

Deployment Diagram

Deployment Diagram is a type of diagram that specifies the physical hardware on which the
software system will execute. It also determines how the software is deployed on the underlying
hardware. It maps software pieces of a system to the device that are going to execute it.

The deployment diagram maps the software architecture created in design to the physical system
architecture that executes it. In distributed systems, it models the distribution of the software
across the physical nodes.

Notations and Symbols

Nodes: A node, represented as a cube, is a physical entity


that executes one or more components, subsystems or
executables. A node could be a hardware or software
element.

Artifacts; Artifacts are concrete elements that are


caused by a development process. Examples of
artifacts are libraries, archives, configuration files,
executable files etc.

Communication Association : This is represented by a solid line between two nodes. It shows
the path of communication between nodes.

57
Devices A device is a node that is used to represent
a physical computational resource in a system. An
example of a device is an application server.

Deployment Specifications: Deployment specifications is


a configuration file, such as a text file or an XML
document. It describes how an artifact is deployed on a
node.

Component: This notation represents other software elements


present in the system. The symbol for the component notation is
a rectangle with two tabs. For instance, a bank application
running on an Android device is a component of the node
(Android device).

Interface

This notation indicates a contractual relationship between two


elements. Its symbol is a circle with a connector line.

 Stereotype: People use this to depict a device that’s contained within the node. To define
a stereotype, put the name into double arrow brackets. For example, the stereotype for
Java Machine is <<Java Machine>>.
 Association: An association is a line that indicates the type of communication that exists
between nodes.
 Dependency: This shows which node or component depends on other nodes or
components. To define a dependency, use a broken or dashed line that ends with an
arrow.

58
Output

59

You might also like