UML Diagram
UML Diagram
Software Engineering
Provided Required
Interfaces Interface
Interfaces
Provided Interfaces
• A provided interface of a component is an interface that
the component realizes.
• Other components and classes interact with a component
through its provided interfaces .
• A component's provided interface describes the services
provided by the component.
Interfaces
Required Interfaces
• A required interface of a component is an interface
that the component needs to function.
• More precisely, the component needs another class or
component that realizes that interface to function.
Interface Representations
The most common notation for interfaces is known
as Ball-and-socket notation
Activity 1:
Order is a component which provides three
interfaces for the other components to access. They
are addLineItem, cancel and pay. It also uses
applyDiscount interface to connect with other
component.
Connecting Components
• There are two ways to connect components.
• Using Dependancy relationship (Dependancy arrow)
addLineItem applyDiscount
Pay
Cancel
Activity 2
• Draw a component using white box notation for the
given scenario.
Desktop PC
• It’s labeled with the stereotype <<device>> to specify that this is a hardware
node.
• The following items are common examples of hardware nodes:
• Hardware Server
• Desktop PC
• Disk drives
Software Nodes
• Also known as software environments.
• A software node is an application context; not parts of the software
going to developed, but a third-party environment that provides
services to software going to develop.
• The following items are examples of execution environment nodes:
• Operating system
• Web server
• Application server
• workflow engine
• database system
• web browser
• J2EE container
• It’s labeled with the stereotype <<executionEnvironment>> to specify
that this is a software node.
Nested Nodes
• Execution environments do not exist on their own,
they run on hardware.
• For example, an operating system needs computer
hardware to run on.
• Execution environment resides on a particular
device indicate by placing the nodes inside one
another, nesting them.
Nested Node: Example
Activity 6
Draw a nested node according to the following
description.
A Hardware server contains a processor. A
J2EEServer execution node resides inside the
processor. A PerformanceEJB component is
installed in the J2EEServer execution node .
Artifacts
• Artifacts are physical files that execute or are used by
the software.
• Common artifacts you'll encounter include:
• Executable files, such as .exe or .jar files
• Library files, such as .dlls (or support .jar files)
• Source files, such as .java or .cpp files
• Configuration files that are used by software at runtime, in formats
such as .xml, .properties, or .txt
• An artifact is shown as a rectangle with the stereotype
<<artifact>>, or the document icon in the upper right hand
corner, or both.
Artifacts
• Deploying an Artifact to a Node.