0% found this document useful (0 votes)
4 views

Unit-2-6

The document covers various aspects of Object-Oriented System Design using C++, including definitions and distinctions between classes and objects, class and object diagrams, and key UML diagrams like collaboration, sequence, use case, package, activity, component, and deployment diagrams. It explains the purpose and components of each diagram, along with steps to create them, emphasizing their role in visualizing and organizing system architecture. Additionally, it discusses generalization and specialization in the context of object-oriented design.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

Unit-2-6

The document covers various aspects of Object-Oriented System Design using C++, including definitions and distinctions between classes and objects, class and object diagrams, and key UML diagrams like collaboration, sequence, use case, package, activity, component, and deployment diagrams. It explains the purpose and components of each diagram, along with steps to create them, emphasizing their role in visualizing and organizing system architecture. Additionally, it discusses generalization and specialization in the context of object-oriented design.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Unit-2

Object-Oriented System Design With C++


# Class:-
1. Class is a blueprint or object.
2. Class is a group of similar objects.
3. Class is a logical entity.
4. Class is created only one time.
5. Class is declared using class keywords. [class student()]
6. Class does not allocated memory.

# 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

Written By:- Munesh Kumnar (Pursuing B.tech (CSE)


# Generalization:-
1. Generalization is a process. Which includes general principles or conclusions or some particular cases or
examples.
2. It represents an “is – a – kind - of” relationship.
For Example:
“car is a kind of land vehicle.”

# 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.

Various terms used in collaboration diagram


1. Objects: Objects shows as rectangles with naming labels. It represents a particular part or element of the
system.
2. Actors: This is an element. Which are outside the system. but let's talk to him.
3. Links: It shows the relationships between objects.
4. Messages: These represent information or requests sent by one object to another.

# 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.

Various terms used in sequence diagram


1. Clas Roles or Participants: It shows the role of the object
2. Activation: This reflects that period. In which some object is doing some work.
3. Messages: Messages are arrow that represent communication between objects.
4. Lifeline: This is a vertical line. Which shows the existence of an object at a particular time.
5. Destroying: This happens when an object is removed from the system
6. Loops: It is used to show repeated messages or actions in sequence diagrams.
a. Asynchronous messages without priority: Asynchronous messages are messages without
priority. In which immediate reply is not expected. And other work goes on simultaneously. These
are represented by solid lines with open arrows in the sequence diagram.
b. Asynchronous messages with priority: Asynchronous messages are messages with priority. In
which immediate reply to the message is expected. But other tasks can also go on simultaneously.
These messages are of high importance. And these can be represented by special symbols in the
sequence diagram. However the display of this symbol may vary depending on the tool.

Written By:- Munesh Kumnar (Pursuing B.tech (CSE)


# Use Case Diagrams:-
Use Case Diagrams are part of the Unified Modeling Language. It is used to visually represent the functional
requirements of a system. They show the interactions between actors.

Components of a Use Case Diagram:


1. Actors: It is used to represent entities that interact with the system.
2. Use Cases: It is used to represent the specific functionalities or services the system provides.
3. System Boundary: It defines the scope of the system.
4. Relationships:
o Association: A line connecting actors to use cases.
o Include: Indicates that a use case always includes another use case.
o Extend: Indicates that a use case conditionally adds additional behavior.
o Generalization: Represents inheritance between use cases or actors.

Steps to Create a Use Case Diagram:


1. Identify Actors: Determine who or what will interact with the system.
2. Identify Use Cases: Define the key functionalities the system must provide.
3. Draw Relationships: Connect actors to relevant use cases and use cases to each other where appropriate.
4. Add a System Boundary: Clearly define the scope of the system being modeled.

# 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.

Purpose of a Package Diagram:


1. Organize the system: Breaks down a complex system into manageable units.
2. Visualize dependencies: Highlights how different parts of the system interact.
3. Facilitate modular design: Helps in designing reusable and maintainable components.

Steps to Create a Package Diagram:


1. Identify Packages: Group related classes, components, or functionalities into logical units.
2. Define Relationships: Show dependencies and associations between packages.
3. Add Details: Include important classes, components, or sub-packages within each package.
4. Optimize Structure: Ensure minimal dependencies between packages for better modularity.

Written By:- Munesh Kumnar (Pursuing B.tech (CSE)


# Activity Diagram:-
An Activity Diagram is a type of UML diagram. It is used to represent the dynamic aspects of a system.
Components of an Activity Diagram:
1. Activities: It is used to represent tasks, functions, or actions to be performed.
2. Initial Node: It is used to represents the starting point of the flow.
3. Final Node: It is used to marks the end of the process.
4. Decision Node: It is used to represents a branching point where decisions are made.
5. Merge Node: It is used to Combines multiple flows into a single path.
Steps to Create an Activity Diagram:
1. Define the Process: It is used to identify the activities involved in the workflow.
2. Determine the Flow: It is used to establish the sequence of activities and any decision points.
3. Add Components: It is used to include initial and final nodes, activities, decisions, forks/joins, and
transitions.
4. Optional - Use Swimlanes: It is used to assign activities to specific actors or components for clarity.

# 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>>.

Written By:- Munesh Kumnar (Pursuing B.tech (CSE)

You might also like