UNIT I UML DIAGRAMS
Introduction to OOAD – Unified Process –
UML diagrams – Use Case – Class Diagrams–
Interaction Diagrams – State Diagrams –
Activity Diagrams –
Package, component and Deployment Diagrams.
Shows the various components in a system and
A component represents a modular,
deployable, and replaceable part
of a system that encapsulates implementation
and exposes a set of interfaces
• Component diagrams are used to model physical aspects of a system
• Physical aspects are the elements like executables, libraries, packages,
files, documents etc which resides in a node.
• A component diagram
– Shows the various components in a system and their dependencies.
• Purpose of the component diagram can be summarized as:
1. Visualize the components of a system.
2. Construct executables by using forward and reverse engineering.
3. Describe the organization and relationships of the components.
• A single component diagram cannot represent the entire system
– But a collection of diagrams are used to represent the whole.
• This diagrams are used during the implementation phase of an application.
– But it is prepared well in advance to visualize the implementation details.
Usage of Component Diagram
• Model the components of a system.
• Model database schema.
• Model executables of an application.
• Model system's source code.
How to draw Component Diagram?
• Before drawing a component diagram the following artifacts are to be
1. Files used in the system.
2. Libraries and other objects relevant to the application.
3. Relationships among the objects.
• After identifying the objects the following points needs to be followed:
1. Use meaningful name to identify the component to which diagram is drawn.
2. Prepare a mental layout before producing using tools.
3. Use notes for clarifying important points.
Notations - Component
• A component represents a physical module of code.
• Component : A modular unit with well-defined interfaces that is replaceable within
– fosters reuse
– Stresses interfaces
• Graphical representation: special kind of class
Nodes and Edges
• Following nodes & edges are typically drawn in a component diagram:
– provided interface,
– required interface,
– component realization,
Components with Ports
• Port represents a service or behavior that a component requires.
• Ports may specify inputs and outputs as they can operate bi-directionally.
• A component with a port for online services
– Along with two provided interfaces order entry and tracking
– Required interface payment.
• Assembly connector
– Bridges a component’s required interface (Component1) with the provided
interface of another component (Component2);
• This allows one component to provide the services that another component
• Two views: (i) Black-box (ii) White-box
• Black-box view: interfaces provided and required only
• White-box view: structure of interfaces and/or internal structure
• Components can be contained in other components
• Interfaces can then be delegated through ports