Object Oriented Analysis and Design
Object Oriented Analysis and Design
Object Oriented Analysis and Design
Purpose of UML
The primary purpose of UML is to enable software developers and system architects to create
blueprints for systems, which can be understood by all stakeholders (e.g., developers, clients,
and business analysts). UML helps in visualizing the design of a system, facilitating
communication, understanding, and collaboration among team members. It also assists in
managing the complexity of software projects by breaking down the system into manageable
components.
1. Things:
o Structural Things: Represent the static elements of a model. They include:
▪ Class: Represents a blueprint of objects in the system, showing
attributes and methods.
▪ Interface: A contract that defines a set of methods that a class must
implement.
▪ Collaboration: A group of classes and associations that work together
to perform a particular function.
▪ Use Case: Describes a set of actions performed by the system to yield
an observable result for an actor.
▪ Component: Represents a modular part of the system with well-
defined interfaces.
▪ Node: A physical element representing a computational resource in the
system.
o Behavioral Things: Represent the dynamic aspects of a system, including:
▪ Interaction: Describes how objects interact to achieve a particular
behavior.
▪ State Machine: Defines the states an object can be in and the
transitions between those states.
▪ Activity: Represents the flow of control or data within the system.
o Grouping Things: Organize elements into groups, such as:
▪ Package: A mechanism to group related elements together.
o Annotational Things: Provide comments or notes about elements within the
model, like:
▪ Note: Annotations that can be attached to any UML element to provide
additional information.
2. Relationships: UML defines the following relationships to show how elements are
associated:
o Association: Represents a relationship between classes, typically depicted
with a line.
o Dependency: Indicates that a change in one element may affect another
element.
o Generalization: Describes an inheritance relationship between a more general
and a more specific element.
o Realization: Represents a contract between two elements, where one element
defines a specification and the other implements it.
o Aggregation/Composition: Special forms of association representing whole-
part relationships. Composition implies stronger ownership than aggregation.
• Definition: An actor in UML represents a role played by a user or any other system
that interacts with the subject (the system under consideration). An actor is typically
external to the system and interacts with it to achieve a goal.
• Example: In an online shopping system, actors could be "Customer," "Admin," and
"Payment Gateway."
Scenarios
3. Use Cases
• Definition: A use case describes a set of actions performed by the system to yield an
observable result that is of value to an actor. It encapsulates all possible scenarios
related to a specific function.
• Example: A use case in the online shopping system could be "Place Order."
3. Explain the phases of System development life cycle giving its salient
features.
A. Phases of the System Development Life Cycle (SDLC)
The System Development Life Cycle (SDLC) is a structured process used for developing
information systems or software applications. It encompasses several distinct phases, each
with specific goals, tasks, and deliverables. The purpose of SDLC is to ensure that the system
meets user requirements, is delivered on time, within budget, and operates efficiently.
1. Planning
• Purpose: To identify the scope, objectives, resources, and timelines for the project.
2. System Analysis
• Purpose: To thoroughly understand the user requirements and define the system's
functional and non-functional requirements.
3. System Design
• Purpose: To translate the requirements into a detailed blueprint for building the
system.
• Purpose: To build the system by writing the actual code based on the design
documents.
o .
5.Testing
• Purpose: To ensure the system meets all the specified requirements and is free of defects.
6.Deployment
• Purpose: To install the system in the production environment and make it available
for use.
7. Maintenance
• Purpose: To monitor and improve the system’s performance after deployment and
ensure it remains functional and relevant.
4. Explain about Unified Process Phases in detail and Draw the use case
diagram for online railway reservation system.
1. Inception Phase
2. Elaboration Phase
3. Construction Phase
4. Transition Phase
1. Modularity
2. Reusability
• Explanation: Objects and classes can be reused across different programs or within
different parts of the same program.
• Advantage: Reusability reduces redundancy, saves development time, and improves
software consistency and reliability.
• Explanation: The modular nature of OOD allows for easier updates, modifications,
and extensions of the system.
• Advantage: Changes to one part of the system can often be made without affecting
other parts, making the system more scalable and maintainable over time.
4. Encapsulation
5. Inheritance
6. Polymorphism
6. Draw the use case diagram for library management system in an object
oriented paradigm
Explanation of Use Case Diagram of a Library Management System
Here, we will understand the designing use case diagram for the library management
system. Some scenarios of the system are as follows :
1. User who registers himself as a new user initially is regarded as staff or
student for the library system.
• For the user to get registered as a new user, registration forms are
available that is needed to be fulfilled by the user.
• After registration, a library card is issued to the user by the librarian.
On the library card, an ID is assigned to cardholder or user.
2. After getting the library card, a new book is requested by the user as per there
requirement.
3. After, requesting, the desired book or the requested book is reserved by the
user that means no other user can request for that book.
4. Now, the user can renew a book that means the user can get a new due date
for the desired book if the user has renewed them.
5. If the user somehow forgets to return the book before the due date, then the
user pays fine. Or if the user forgets to renew the book till the due date, then
the book will be overdue and the user pays fine.
6. User can fill the feedback form available if they want to.
7. Librarian has a key role in this system. Librarian adds the records in the library
database about each student or user every time issuing the book or returning
the book, or paying fine.
8. Librarian also deletes the record of a particular student if the student leaves
the college or passed out from the college. If the book no longer exists in the
library, then the record of the particular book is also deleted.
9. Updating database is the important role of Librarian
A. Domain Analysis is the process of studying and understanding a specific problem domain
in order to identify the commonalities, variability, concepts, and relationships that are
essential to the development of software within that domain. It involves gathering
information about the domain, understanding the key entities and their interactions, and
defining the requirements and constraints that are typical for software solutions in that area.
Benefits:
• Efficiency.
• Reusability
• Consistency
• ii) Behavior Analysis
Behavior Analysis in software engineering focuses on understanding and modeling how the
system behaves in response to various inputs or events. It involves studying the dynamic
aspects of the system, such as how objects or components interact with each other over time
to fulfill the system’s requirements.
Key Aspects of Behavior Analysis:
Benefits:
• Clarity.
• Error Detection.
• Improved Design.
8.Summarize Unified process, its all phases. Draw the component diagram for
bank management system?
A. 1 Inception –
•Communication and planning are the main ones.
•Identifies the scope of the project using a use-case model allowing
managers to estimate costs and time required.
• Customers’ requirements are identified and then it becomes easy to
make a plan for the project.
• The project plan, Project goal, risks, use-case model, and Project
description, are made.
• The project is checked against the milestone criteria and if it
couldn’t pass these criteria then the project can be either canceled
or redesigned.
2. Elaboration –
• Planning and modeling are the main ones.
• A detailed evaluation and development plan is carried out and
diminishes the risks.
• Revise or redefine the use-case model (approx. 80%), business
case, and risks.
• Again, checked against milestone criteria and if it couldn’t pass
these criteria then again project can be canceled or redesigned.
• Executable architecture baseline.
3. Construction –
• The project is developed and completed.
• System or source code is created and then testing is done.
• Coding takes place.
4. Transition –
• The final project is released to the public.
• Transit the project from development into production.
• Update project documentation.
• Beta testing is conducted.
• Defects are removed from the project based on feedback from the
public.
5. Production –
• The final phase of the model.
• The project is maintained and updated accordingly.
Artifacts:
• Inception: Vision Document, Business Case, Initial Use Case Model, Feasibility
Report, Risk List, Preliminary Project Plan.
• Elaboration: Architectural Design Document, Detailed Use Case Model, Prototyping
Results, Risk Management Plan, Revised Project Plan.
CO-2
1. Explain interaction diagram? Mention the types of interaction diagram.
A. Interaction Diagram
Interaction Diagrams are a type of UML diagram used to model the interactions between
objects or components in a system. They provide a dynamic view of how various parts of the
system collaborate to achieve a particular functionality or process. Interaction diagrams focus
on the flow of messages between objects and the sequence of events that occur during
interactions.
1. Sequence Diagram
o Purpose: Illustrates how objects interact in a particular sequence of events
over time. It shows the order in which messages are exchanged between
objects and how the system’s behavior unfolds.
o Key Elements:
▪ Objects: Represented by lifelines (vertical dashed lines) at the top of
the diagram.
▪ Messages: Arrows between lifelines indicating communication
between objects.
▪ Activation Bars: Represent the period during which an object is active
or engaged in a process.
o Use Cases: Useful for detailing scenarios where the sequence of interactions
is crucial, such as complex workflows or real-time systems.
2. Communication Diagram (Collaboration Diagram)
o Purpose: Focuses on the relationships between objects and the messages
exchanged among them. It provides a static view of the object interactions and
their organization within a network.
o Key Elements:
▪ Objects: Represented by circles or rectangles.
▪ Messages: Labeled arrows indicating communication between objects.
▪ Links: Lines connecting objects to show relationships.
o Use Cases: Useful for visualizing how objects collaborate to perform a
particular task and understanding the overall structure of interactions.
3. Timing Diagram
o Purpose: Represents the time constraints and behavior of objects over time. It
shows how the state of objects changes over a period and how events and
messages are timed.
o Key Elements:
▪ Lifelines: Horizontal lines representing the objects over time.
▪ Events and Messages: Indicate changes in state and interactions.
▪ Time Constraints: Show timing requirements and conditions.
o Use Cases: Useful for modeling real-time systems where timing constraints
and synchronization are critical.
o .
2.Illustrate State Chart Diagram and explain when to use State Diagram
A. Any real-time system is expected to be reacted by some kind of
internal/external events. These events are responsible for state change of the
system.
• State chart diagram is used to represent the event driven state change of a
system. It basically describes the state change of a class, interface, etc.
• State chart diagram is used to visualize the reaction of a system by
internal/external factors.
3.Draw the class diagram for a stock maintenance system with the neat sketch
with the representation of the objects.
• Product: Represents the items in stock with attributes like productId, name, price, and
methods for managing product details.
• Stock: Manages the inventory levels of products with attributes like stockId, quantity,
and methods for adding and updating stock.
• Supplier: Represents suppliers with attributes like supplierId, name, and methods for
managing supplier details.
• Order: Represents orders placed for products with attributes like orderId, quantity, and
methods for managing orders.
Both Sequence Diagrams and Collaboration Diagrams are types of UML interaction
diagrams used to model how objects interact within a system. However, they focus on
different aspects of interactions and have distinct visual representations. Here’s a comparison
of the two:
Sequence Diagram
Purpose:
Key Features:
Use Cases:
• Suitable for modeling scenarios where the sequence and timing of interactions are
crucial, such as complex workflows, use case scenarios, or real-time systems.
Purpose:
Key Features:
Use Cases:
• Suitable for understanding how objects collaborate and interact in a system, and for
visualizing the overall structure of interactions.
5.Draw the state chart diagram for university management system with the
necessary flow.
6. Summarize the concept of class diagram, draw the activity diagram for
online quiz management system
A. Class diagrams are a type of UML (Unified Modeling Language) diagram used in
software engineering to visually represent the structure and relationships of
classes within a system i.e. used to construct and visualize object-oriented
systems.
Class diagrams provide a high-level overview of a system’s design, helping to
communicate and document the structure of the software. They are a fundamental tool in
object-oriented design and play a crucial role in the software development lifecycle .
7.Describe Domain Model. Is a domain model a Picture of Software Business
Objects. Are Domain and Data Models the Same
A.Domain Model
A Domain Model is a conceptual model that represents the key entities, relationships, and
concepts within a specific domain or business area. It is used to understand and document the
essential aspects of the business or problem space, often as a precursor to designing and
implementing a software system. The domain model provides a high-level view of the
domain, focusing on its structure and the interactions between different entities.
1. Entities:
o Definition: The primary objects or concepts within the domain. These are
often represented as classes or objects in the domain model.
o Example: In a library management system, entities might include Book,
Member, and Loan.
2. Attributes:
o Definition: Properties or characteristics of entities. Attributes describe the
data associated with each entity.
o Example: For the Book entity, attributes might include title, author, and
ISBN.
3. Relationships:
o Definition: The associations or connections between entities. Relationships
indicate how entities interact or relate to one another.
o Example: A Member might have a relationship with a Loan, indicating that the
member can borrow books.
4. Associations and Aggregations:
o Definition: Show how entities are linked and their interactions. Aggregations
represent whole-part relationships where parts can exist independently of the
whole.
o Example: A Library might aggregate Books, showing that a library contains
multiple books.
5. Conceptual Focus:
o Definition: The domain model focuses on the business concepts and their
relationships, not on how these concepts are implemented in software or
databases.
Domain Model:
Data Model:
• Purpose: To represent how data is stored and organized within a database, focusing
on data structures and their relationships.
• Representation: Often presented as Entity-Relationship (ER) diagrams or database
schema diagrams showing tables, columns, and foreign keys.
• Focus: Database design and data integrity; it captures how data is structured and
accessed in the database.
Comparison:
• Domain Model:
o Purpose: Understand and represent the business domain.
o Focus: Business concepts and interactions.
o Representation: Conceptual diagrams, UML class diagrams.
o Changes: Evolve with changes in business requirements.
• Data Model:
o Purpose: Design and organize database structure.
o Focus: Data storage and relationships.
o Representation: ER diagrams, database schemas.
o Changes: Evolve with changes in data storage and access needs.
8. Explain the nature of Class and Object? How to identify Classes and Objects
with suitable
Class
A Class is a blueprint or template that defines the structure and behavior of objects. It serves
as a model for creating individual instances (objects) and encapsulates data (attributes) and
methods (functions) that operate on the data.
Key Characteristics:
1. Attributes:
o Represent the data or properties of the class.
o Example: In a Car class, attributes might include make, model, and year.
2. Methods:
o Represent the behavior or functions that can be performed by the class.
o Example: In the Car class, methods might include start(), accelerate(),
and brake().
3. Encapsulation:
o Encapsulates data and methods together, protecting the internal state and
requiring access through public methods.
4. Inheritance:
o Classes can inherit attributes and methods from other classes (superclasses) to
create subclasses with extended or modified behavior.
5. Abstraction:
o Provides a high-level view of the class without exposing the details of its
implementation.
An Object is an instance of a class. It represents a specific entity with its own state and
behavior defined by the class. Objects interact with each other and the environment based on
the methods and attributes of their class.
Key Characteristics:
1. State:
o The current values of the attributes of the object.
o Example: A Car object might have make as "Toyota", model as "Camry", and year
as 2023.
2. Behavior:
o The actions that the object can perform based on its methods.
o Example: A Car object can perform the start() method to start the engine.
3. Identity:
o Each object has a unique identity, even if its state is identical to another object