Lec 6 - Component Diagrams
Lec 6 - Component Diagrams
Lec 6 - Component Diagrams
Lecture 6
1
Component Diagram: Why?
• Logical modeling is to visualize, specify, and document the decisions
about the vocabulary of the domain and the structural and behavioral
way those things collaborate.
2
What is a UML Component?
• The Rational definition
“A component is a physical and replaceable part of a system that
conforms to and provides the realization of a set of interfaces”
• A component is a single piece of software…i.e Physical module of
code.
• Graphically denoted as a rectangle with tabs.
Component
3
What is a UML Component?
• We use components to model physical things that may reside on a
node, such as executables, libraries, tables, files, and documents.
4
What is a Component Diagram?
• Is a way to model the physical aspects of an Object Oriented system.
• visualize and specify component based systems.
• That is…Explains the structure of a system
• Shows the organizations and dependencies among software
components.
• Collection of
• Components
• Interfaces
• The relationships between them
5
What is a UML Component?
• Key word in the definition is physical.
• A component must be something physical in the system
• Binary executable
• Data file
• In software, many operating systems and programming
languages directly support the concept a component.
6
Components & Classes
• Both have names, may realize set of interfaces, both may participate in
dependency, generalization, and association relationships.
7
Component structure
• Components were nothing more than a well defined set of classes
with a clear interface that required no other objects to perform a
given task.
• Component structure shows
• Name of component
• Type of component (executable, file, table, document, library)
• Interfaces to the component
8
Interface
• An interface is a collection of operations that are used to specify a
service of a class or a component.
9
Provided and required interfaces
• Provided Interface - describes the functionality offered by a class.
10
Provided and required interfaces
11
Component Diagram Example
12
12
Component Diagram Explained
• Diagram in the previous slide shows how the components are
related to each other.
13
Example 2
14
Ticket Selling System Component Diagram Example
There is a ticket seller component that sequentializes requests from both ticket selling system and
clerks. A component that processes credit card charges; and the database containing the ticket
information.
15
Summary
• Component diagram breaks down the actual system under
development in to various high levels of functionality.
16