Unit-2-6
Unit-2-6
# Objects:-
1. Object is an example of class.
2. Object is a real world entity.
3. Object is a physical entity.
4. Object is created many times.
5. Object is declared using new keywords. [student s1 = new student ();]
6. Object allocates memory.
# Class Diagram:-
1. Class diagram is a ststic diagram.
2. It represents the static view of an applicatin.
3. Class diagram is used for visualizing, describing, and documenting different aspects of a system.
4. Class diagram describes the attributes and operatins of a class.
5. The class diagrams are widely used in the modeling of object-oriented systems.
For Example:
By:- Quantum
# Object Diagram:-
1. Object diagrmas represent an instance of a class diagram.
2. Object diagram represents the static ciew of a system.
3. Object diagrams are used to render a set of objects.
For Example:
By:- Quantum
# Specialization:-
1. Specialization is a reverse process of generalization.
2. It can be sais thatn the subclass are the specialized versions of the super-class.
Chart:
# Collaboration Diagram:-
A collaboration diagram is also known as a communication diagram. Collaboration diagram is a type of Unified
Modeling Language diagram. Which shows objects and the relationships between them. This diagram helps to
understand the flow of messages between objects.
# Sequence Diagram:-
Sequence diagram is also called event diagram. It is used to visualize runtime scenarios. In UML, it is shown as a
table. That shows objects arranged along x-axis and messages along the y-axis.
# Package Diagram:-
A Package Diagram is another type of UML diagram. It is used to represent the modular structure of a system. This is
useful for organizing large systems and understanding dependencies between components.
Key Elements of a Package Diagram:
1. Packages: It is used to represent groups of related elements, such as classes or subsystems.
2. Classes and Interfaces: It is used to show internal elements.
3. Relationships:
o Association: Shows a structural relationship between packages or elements.
o Generalization: Represents inheritance or implementation relationships.
# Component Diagram:-
A Component Diagram is a type of UML diagram used to visualize the physical components of a system and their
relationships.
Key Elements of a Component Diagram:
1. Components: It is used to represent modular parts of the system.
2. Interfaces: It is used to Represent the interaction points between components.
3. Relationships:
o Association: It is used to represents a structural relationship between components.
o Realization: It is used to represents the implementation of an interface by a component.
4. Nodes: It is used to represent the physical devices or execution environments.
5. Artifacts: It is used to represent physical files associated with components.
Purpose of a Component Diagram:
• Visualize system architecture: Show how components interact.
• Define responsibilities: Clarify the role of each component.
• Understand dependencies: Highlight interactions and interfaces.
• Facilitate modular design: Promote reuse and maintainability.
Steps to Create a Component Diagram:
1. Identify Components: It is used to determine the main building blocks of the system.
2. Define Interfaces: It used to identify the interaction points between components.
3. Establish Relationships: It is used to connect components using appropriate relationships.
4. Add Artifacts and Nodes: It is used to include physical files and deployment nodes, if necessary.
# Deployment diagram:-
A deployment diagram is a type of UML diagram. That is used to visually represents the physical deployment of
artifacts. (software components, applications, databases) onto nodes (hardware or computational resources).
Key Elements of a Deployment Diagram:
1. Nodes: It is used to represent physical or virtual computational resources such as servers, devices.
2. Artifacts: It is used to represent the software or data being deployed on nodes.
3. Communication Paths: It is used to represent the connections between nodes.
4. Dependencies: It is used to show the relationships or dependencies between artifacts or nodes.
5. Stereotypes: It is used to provide additional details about the type of nodes or artifacts, such as
<<database>>, <<web server>>, or <<application>>.