Oose 4
Oose 4
What are the characteristics of a good design? Describe different types of coupling
and cohesion. How design evaluation is performed?
If I need to choose one I will choose Microservices Architecture because it is ideal for large-
scale, complex applications where scalability, flexibility, and resilience are critical. While it
introduces some complexity, the benefits in terms of scalability and maintainability often
outweigh the downsides, especially as applications grow in size and complexity.
List the different type of architecture styles and describe the data centered and
object oriented architecture with necessary diagram
Architectural Styles
Software architecture defines the high-level structure of a system, its components, their
interactions, and the principles that guide its design. Here are some common
architectural styles:
• Data-Centered Architecture:
o Data is the central focus, with applications built around managing and
manipulating data efficiently.
Diagram:
+-------------------+
| Data | (Central Focus)
+-------------------+
|
v
+-------------------+
| Application Logic |
Diagram:
+---------+ +---------+ +---------+
| Object 1 | --> | Object 2 | --> | Object 3 |
+---------+ +---------+ +---------+
| | |
(Data) (Data) (Data)
| | |
(Methods) (Methods) (Methods)
| | |
communicates communicates communicates
through messages through messages through messages
• Client-Server Architecture:
o Separates the application into a client (user interface) and a server
(business logic and data).
o Clients request services from the server, which processes them and sends
responses.
o Offers scalability, security, and centralized management.
o Examples: Web applications, email systems.
• Layered Architecture:
o Organizes the system into horizontal layers, with each layer providing a set
of services to the layer above it.
o Promotes modularity, maintainability, and ease of testing.
o Example: Presentation layer, business logic layer, data access layer.
• Microservices Architecture:
o Deconstructs an application into smaller, independent services that
communicate through well-defined APIs.
o Offers flexibility, scalability, and faster development cycles.
o Example: E-commerce applications, financial systems.
• Event-Driven Architecture (EDA):
o Components communicate by publishing and subscribing to events.
o Enables loose coupling between components and facilitates asynchronous
communication.
o Example: Real-time chat applications, sensor data processing.
Discuss various design concepts related to software design. Explain in detail about
designing class based components.
Encapsulation: Bundling data and methods that operate on the data into a single unit
or class. Example: In a "Car" class, the speed variable and methods like accelerate() and
brake() are encapsulated.
Explain about user interface design. Discuss various architectural styles and
architectural patterns with suitable example.
User Interface (UI) Design focuses on creating interfaces that are easy to use and
provide a positive user experience. Key principles include:
Architectural Styles
• Description: Divides the system into layers, each with specific responsibilities.
• Example: A web application with presentation, business logic, and data access
layers.
2. Client-Server Architecture
• Description: Separates the client (front-end) from the server (back-end) with
each handling specific tasks.
• Example: A web browser (client) requesting web pages from a web server.
3. Microservices Architecture
Architectural Patterns
1. Model-View-Controller (MVC)
2. Observer Pattern
3. Singleton Pattern
• Description: Ensures a class has only one instance and provides a global point of
access to it.
• Example: A configuration manager in an application that needs to maintain a
single set of configurations.
Traditional Components:
• Focuses on data: Data is the central element, with applications built around
managing and manipulating it efficiently.
• Well-defined data structures: Independent of the functions that operate on
them.
• Suitable for:
o Data-intensive applications that rely heavily on storage, retrieval, and
analysis.
o Examples: Databases, content management systems.
Benefits:
• Components:
o Books (data: title, author, ISBN, methods: borrow(), return())
o Members (data: name, ID, methods: borrow(Book), return(Book))
o Data Store (central repository for all book and member information)
• Advantages:
o Easy to add new functionalities (e.g., online reservations) without
modifying core data structures.
o Scalable data storage to accommodate a growing library.
o Existing applications (e.g., checkout system) can access the same data for
integrated operation.
Explain with neat sketch Wing control and Canard Control-NOT RELEVANT TO OOSE
Wing Control
1. Modular Design:
o Wing Control: Separates control surfaces (ailerons, flaps, elevators) for
specific flight dynamics.
o OOSE: Encapsulates data and methods in classes for maintainability and
scalability.
2. Hierarchy and Inheritance:
o Wing Control: Control surfaces work together hierarchically.
o OOSE: Uses inheritance to create a class hierarchy.
3. Encapsulation and Abstraction:
o Wing Control: Control surfaces encapsulate specific functions.
o OOSE: Hides internal state and simplifies complex systems.
Diagram:
Wing Control (OOSE)
/ \
/ \
+-------------------------------+
| Control Surfaces |
+-------------------------------+
| + Aileron: controlRoll() |
| + Elevator: controlPitch() |
| + Flaps: adjustLift() |
+-------------------------------
Canard Control
Diagram:
Canard Control (OOSE)
/ \
/ \
+---------------------------------+
| Control Surfaces |
+---------------------------------+
| + Canards: controlPitch() |
| + Main Wing: stabilizeFlight() |
+---------------------------------+
Q.NO 9,10 ALSO NOT RELEVANT TO OOSE
MOD 4 - PART B
Design patterns are typical solutions to common problems in software design. They
are like templates that can be applied to solve recurring design issues in different
contexts. Here are some fundamental design patterns, explained simply:
Creational Patterns
1. Singleton
o Purpose: Ensure a class has only one instance and provide a global point
of access to it.
o Example: A configuration manager where a single instance manages
the application's settings.
2. Factory Method
o Purpose: Define an interface for creating an object, but let subclasses
alter the type of objects that will be created.
o Example: A document editor where the base class provides an interface
to create different types of documents, and subclasses specify the type
(e.g., text document, spreadsheet).
3. Builder
o Purpose: Separate the construction of a complex object from its
representation so that the same construction process can create
different representations.
o Example: Building a house where the builder constructs the house step
by step, and the final product can be a wooden house or a brick house.
Structural Patterns
1. Adapter
o Purpose: Allow incompatible interfaces to work together by converting
one interface into another.
o Example: A power adapter that allows a device from the US to plug
into a European outlet.
2. Composite
o Purpose: Compose objects into tree structures to represent part-whole
hierarchies, allowing individual objects and compositions to be treated
uniformly.
o Example: A graphic design application where a drawing can consist of
both simple shapes and groups of shapes.
3. Decorator
o Purpose: Attach additional responsibilities to an object dynamically,
providing a flexible alternative to subclassing.
o Example: Adding scrollbars to a window in a GUI application where the
window can be decorated with scrollbars at runtime.
Behavioral Patterns
1. Observer
o Purpose: Define a one-to-many dependency between objects so that
when one object changes state, all its dependents are notified and
updated automatically.
o Example: A news agency where multiple subscribers (observers) receive
updates when there is a new article (subject).
2. Strategy
o Purpose: Define a family of algorithms, encapsulate each one, and
make them interchangeable. The strategy pattern lets the algorithm
vary independently from clients that use it.
o Example: A navigation app where the route calculation strategy can
vary (e.g., fastest route, shortest route, scenic route).
3. Command
o Purpose: Encapsulate a request as an object, thereby allowing for
parameterization of clients with queues, requests, and operations.
o Example: A text editor where user actions like typing, copying, and
pasting are encapsulated as command objects that can be executed,
undone, and redon
Scenario-Based Modeling
Key Concepts:
Key Concepts
1. Use Cases:
o Definition: Describe how users (actors) interact with the system to achieve
specific goals.
2. User Stories:
3. Scenarios:
Process
1. Identify Actors: Determine who will interact with the system (e.g., users, other
systems).
2. Define Use Cases: Outline the main interactions each actor will have with the system.
3. Write User Stories: Create brief descriptions of each feature from the user's
perspective.
4. Develop Scenarios: Write detailed narratives for each use case or user story,
describing specific instances of interaction.
Example
• User : Customer
• Steps:
User Story: "As a customer, I want to search for products so that I can find what I need
quickly."
Scenario:
• Proceeds to checkout.
Key Concepts
1. Classes:
o Definition: Blueprints for objects.
o Components: Attributes (data) and Methods (functions).
o Example: Car class with attributes like make, model, and methods like
start(), stop().
2. Objects:
o Definition: Instances of classes.
o Example: myCar is an instance of the Car class.
3. Attributes:
o Definition: Characteristics of a class.
o Example: color, speed in Car class.
4. Methods:
o Definition: Functions that describe behaviors.
o Example: accelerate(), brake() in Car class.
5. Relationships:
o Association: General use or interaction.
o Inheritance: Subclass inherits from parent class.
o Aggregation: "Whole-part" relationship.
o Composition: Stronger form of aggregation.
Example
Class: Car
• Attributes: batteryLife
• Methods: chargeBattery()
3. Establish Relationships:
6. Refine Design:
o Review and Refactor: Improve the design based on feedback and testing to
ensure it meets requirements efficiently.
1. Domain Modeling
o Techniques:
2. Requirement Elicitation
o Techniques:
o Purpose: To identify and describe the interactions between users (actors) and
the system.
o Techniques:
▪ Use Case Diagrams: Illustrate actors and their interactions with the
system.
o Example: A use case for “Borrow Book” in a library system would describe the
process a user follows to borrow a book, including checking out and returning.
o Techniques:
5. Prototyping
o Techniques:
1. Define Requirements:
Identify and document the system’s goals and required functionalities. Gather
detailed needs from stakeholders to guide the entire design process.
2. Identify Modules:
Break down the system into distinct, manageable units based on
functionality. Group related tasks and data into these modules to simplify
development and maintenance.
3. Define Interfaces:
Specify how modules will interact with each other, including inputs, outputs,
and communication protocols. Ensure interfaces are well-defined to facilitate
smooth integration.
4. Design Modules:
Develop the internal structure and logic for each module. Define the
components and their interactions within the module to ensure it meets its
intended purpose.
5. Ensure Loose Coupling:
Minimize dependencies between modules to enhance flexibility. Use clear and
well-defined interfaces to prevent modules from being tightly intertwined.
6. Achieve High Cohesion:
Ensure each module focuses on a single responsibility or function. Group
related functions and data together to create a well-organized and cohesive
module.
7. Implement and Test:
Build each module according to the design specifications. Conduct unit
testing to verify that each module functions correctly and meets its design
criteria.
8. Integrate:
Combine the individual modules into the complete system. Perform
integration testing to ensure that modules work together seamlessly and the
system functions as intended.
9. Refine and Maintain:
Continuously improve and update modules based on feedback and changing
requirements. Address issues and make enhancements to maintain system
performance and relevance.
8 Explain about Design concepts for Modular Design shortly
1. Modularity:
o Definition: Divide a system into distinct, manageable modules. Each module
handles a specific part of the functionality, making development and
maintenance easier.
2. Encapsulation:
3. Cohesion:
4. Coupling:
5. Abstraction:
6. Reusability:
• Classes: These are blueprints or templates that define the attributes (data)
and methods (functions) of objects. A class represents a category of similar
things.
• Objects: Instances of classes that encapsulate data (attributes) and behavior
(methods). They interact with each other to fulfill the system's requirements.
• Attributes: Properties or characteristics associated with an object (e.g.,
name, size, color).
• Methods: Operations or actions that an object can perform (e.g., calculate
area, move location, send message).
Objects are not isolated entities; they collaborate and interact to achieve specific
tasks. These interactions are represented by relationships in the object model. Here
are some common types of relationships:
1. Association:
o Definition: General interaction between objects, showing how they are
linked.
o Example: A Member can borrow multiple Books, and each Book can be
borrowed by various Members.
2. Aggregation:
o Definition: A "whole-part" relationship where the part can exist
independently of the whole.
o Example: A Library contains Books, but Books can exist outside the
library.
3. Composition:
o Definition: A stronger "whole-part" relationship where the part's
existence depends on the whole.
o Example: A Library has Shelves, which are integral to the library’s
organization.
4. Inheritance:
o Definition: Mechanism where a new class (subclass) inherits attributes
and methods from an existing class (superclass).
o Example: DigitalBook inherits from Book, adding features like fileSize
1. Requirements Gathering
2. Requirements Analysis
3. System Modeling
• Definition: Create models to represent the system’s functionality and data
flow.
• Activities: Develop Data Flow Diagrams (DFDs) to depict data processes and
flows. Create entity-relationship diagrams (ERDs) to show data entities and
their relationships. Use context diagrams to provide a high-level view of
system boundaries.
4. Design Specification
• Definition: Detail the system design based on the analysis and modeling.
• Activities: Create detailed specifications for system components, including
data structures, processes, and interfaces. Develop a design document that
outlines how the system will be implemented.
• Definition: Ensure that the analysis and design meet the requirements and
are feasible.
• Activities: Review and validate models and specifications with stakeholders.
Conduct walkthroughs and inspections to confirm that the system design
aligns with the requirements and objectives.
6. Documentation
1. Modularity:
2. Encapsulation:
3. Abstraction:
4. Cohesion:
5. Coupling:
o Definition: Minimize dependencies between modules.
6. Reusability:
Design Principles
o Definition: Classes should be open for extension but closed for modification.
1. States: Represent the various conditions or situations an object can be in. They are
typically depicted as rectangles.
4. Initial State: The starting point of the state diagram, usually depicted as a filled
circle.
5. Final State: The end point of the state diagram, usually depicted as a bullseye or a
filled circle within a circle.
Let's sketch a state diagram for a card swipe, PIN entry, and authentication process.
Transitions:
Analysis in the context of software engineering and systems design refers to the
process of understanding and defining the requirements and behaviors of a system.
It involves studying the problem domain to determine what needs to be built and
how it should function. The analysis phase is crucial for ensuring that the final
product meets the needs of its users and stakeholders.
• Clarify Requirements: Ensure that all stakeholder needs are understood and
documented.
• Design Foundation: Provide a basis for creating detailed design
specifications and system architecture.
• Communication: Serve as a communication tool between stakeholders,
analysts, and developers to ensure a shared understanding of the system.
• Validation: Help in verifying that the system's design aligns with the defined
requirements and expectations.
o Start and End Nodes: Indicate the beginning and end of the workflow.
Shown as filled circles (start) and circles with a border (end).
3. Sequence Diagrams:
o Objects/Actors: Entities that interact within the system. Represented as
vertical lines.
o Messages: Communication between objects or actors. Shown as arrows
along the vertical lines.
o Lifelines: Represent the existence of an object over time. Shown as dashed
vertical lines.
4. Flowcharts:
o Processes: Actions or steps in a process. Depicted as rectangles.
o Decision Points: Points where a decision is made. Represented as
diamonds.
o Start/End: Beginning and ending points of the flow. Shown as ovals.
It essentially describes how many rows in one table can be linked to how many rows in
another table.
Types of Cardinality:
1. One-to-One (1:1):
o Each instance of Entity A is related to exactly one instance of Entity B,
and vice versa.
o Example: Each person (Entity A) has one unique social security number
(Entity B). Conversely, each social security number belongs to only one
person.
2. One-to-Many
o One instance of Entity A can be associated with multiple instances of
Entity B, but each instance of Entity B is associated with only one
instance of Entity A.
o Example: A single author (Entity A) can write multiple books (Entity B).
Each book is written by only one author.
3. Many-to-One (M:1):
o Multiple instances of Entity A are related to a single instance of Entity
B, but each instance of Entity B can be associated with multiple
instances of Entity A.
o Example: Many students (Entity A) are enrolled in one specific class
(Entity B). Each class can have many students.
4. Many-to-Many
o Multiple instances of Entity A can be related to multiple instances of
Entity B, and vice versa.
o Example: Students (Entity A) can enroll in multiple courses (Entity B),
and each course can have multiple students.
Let's consider a university database with two entities: Students and Courses.
• Students (Entity A)
• Courses (Entity B)
16 Define structured analysis? What are the structured analysis tools explain
User Object Model is a conceptual framework used to describe and design the
interactions between users and a system. It focuses on the user's perspective,
defining how users interact with the system, the objects they manipulate, and how
these interactions are managed. This model helps in understanding user needs,
system requirements, and the overall user experience.
18 Describe basic the elements of DFD? What are the structured analysis tools
explain
1. Processes:
o Symbol: Circle or rounded rectangle
o Description: Represents a function or activity where data is processed.
Processes transform incoming data into outgoing data.
2. Data Stores:
o Symbol: Open-ended rectangle or two parallel lines
o Description: Represents a repository of data that is stored for use by
one or more processes. Data stores hold data that processes can access
and modify.
3. Data Flows:
o Symbol: Arrow
o Description: Represents the movement of data between processes,
data stores, and external entities. The direction of the arrow indicates
the flow direction.
4. External Entities:
o Symbol: Rectangle
o Description: Represents external sources or destinations of data, such
as users, systems, or organizations that interact with the system but
are not part of the system itself.