Software Engineering - Module 3
Software Engineering - Module 3
1. **Abstraction**:
- Abstraction involves focusing on essential characteristics while
ignoring irrelevant details. It helps manage complexity by hiding
unnecessary implementation details and emphasizing the relevant
aspects of the system.
2. **Modularity**:
- Modularity is the principle of dividing a system into smaller,
independent, and reusable modules or components. Each module
encapsulates a specific functionality or behavior, making the
system easier to understand, maintain, and modify.
3. **Encapsulation**:
- Encapsulation is the process of bundling data and methods
that operate on the data into a single unit called a class. It hides
the internal state of an object and restricts access to the object's
data, promoting information hiding and reducing dependencies
between components.
4. **Inheritance**:
- Inheritance allows a class to inherit properties and behaviors
from another class, known as its superclass or parent class. It
enables code reuse, promotes extensibility, and supports the
creation of hierarchical relationships between classes.
5. **Polymorphism**:
- Polymorphism allows objects of different types to be treated
uniformly through a common interface. It enables dynamic
method dispatch, where the appropriate method implementation
is determined at runtime based on the object's actual type,
facilitating code reuse and flexibility.
6. **Composition**:
- Composition involves creating complex objects by combining
simpler objects or components. It allows for the creation of
modular and flexible designs, where objects can be composed
and decomposed dynamically to achieve different functionalities.
7. **Decomposition**:
- Decomposition is the process of breaking down a complex
system into smaller, more manageable parts or modules. It helps
simplify the design, improve understandability, and promote code
reuse and maintainability.
9. **Design Patterns**:
- Design patterns are reusable solutions to common design
problems encountered in software development. They provide
proven solutions and best practices for organizing and structuring
code to address specific design challenges effectively.
1. **Modularity**:
- The system is divided into cohesive and loosely coupled
modules or components, each responsible for a specific
functionality or aspect of the system.
- Modularity promotes code reuse, facilitates maintenance, and
supports incremental development and testing.
2. **Abstraction**:
- The design emphasizes essential characteristics while hiding
unnecessary implementation details, making the system easier to
understand, maintain, and modify.
- Abstraction helps manage complexity and fosters a clear
separation of concerns between different components of the
system.
3. **Encapsulation**:
- Data and methods that operate on the data are encapsulated
within classes, hiding the internal state of objects and exposing
only the necessary interfaces to interact with them.
- Encapsulation promotes information hiding, reduces
dependencies, and enhances the maintainability and flexibility of
the system.
4. **High Cohesion**:
- Modules or components within the system exhibit high
cohesion, meaning that elements within each module are closely
related and work together to achieve a common purpose.
- High cohesion promotes clarity, reusability, and maintainability
by ensuring that each module has a well-defined and focused
responsibility.
5. **Low Coupling**:
- Modules or components within the system exhibit low
coupling, meaning that they are loosely connected and have
minimal dependencies on each other.
- Low coupling reduces the impact of changes, promotes
flexibility and scalability, and facilitates independent development
and testing of modules.
8. **Maintainability**:
- The design is easy to maintain, with clear and well-organized
code, consistent naming conventions, and comprehensive
documentation.
- Maintainable designs facilitate troubleshooting, debugging,
and code refactoring, helping developers identify and fix issues
quickly and effectively.
9. **Performance**:
- The design takes into account performance considerations,
such as efficient algorithms, data structures, and resource
utilization, to ensure optimal system performance under normal
and peak loads.
- Performance-aware designs minimize bottlenecks, latency,
and resource contention, providing a responsive and reliable user
experience.
2. **Common Coupling**:
- Occurs when multiple modules share a global data source,
such as a global variable or database.
- Changes to the shared data source affect multiple modules,
leading to potential conflicts and unintended side effects.
3. **Control Coupling**:
- Occurs when one module controls the behavior of another
module by passing control information, such as flags or status
codes.
- Control coupling introduces dependencies between modules
based on control flow, making the system less modular and
harder to understand.
4. **Stamp Coupling**:
- Occurs when modules share complex data structures or
parameters, passing them as a single data structure (e.g., a
record or struct).
- Changes to the shared data structure may require
modifications to multiple modules, increasing the risk of errors
and inconsistencies.
5. **Data Coupling**:
- Occurs when modules communicate by passing data through
parameters or return values, without sharing global data or control
information.
- Considered the weakest and most desirable form of coupling,
as it promotes modularity, reusability, and maintainability.
1. **Functional Cohesion**:
- Occurs when elements within a module are related by
performing a single, well-defined task or function.
- Modules with functional cohesion exhibit a clear and focused
purpose, making them easy to understand, test, and maintain.
2. **Sequential Cohesion**:
- Occurs when elements within a module are related by their
sequential order of execution, with output from one element
serving as input to the next.
- Sequential cohesion may indicate that a module is performing
multiple tasks or responsibilities, reducing its clarity and
reusability.
3. **Communicational Cohesion**:
- Occurs when elements within a module are related by the data
they share or communicate, without a specific sequential order.
- Modules with communicational cohesion focus on processing
a particular data set or performing a specific operation, regardless
of the order of execution.
4. **Procedural Cohesion**:
- Occurs when elements within a module are related by their
procedural flow, with one element calling or invoking another to
perform a series of related tasks.
- Procedural cohesion may indicate that a module is performing
a series of interrelated tasks or operations, potentially reducing its
clarity and maintainability.
5. **Temporal Cohesion**:
- Occurs when elements within a module are related by their
temporal proximity or occurrence within a specific time frame.
- Temporal cohesion may indicate that a module is performing
tasks or operations that are logically related but executed at
different times or under different conditions.
User interface (UI) design focuses on creating the graphical elements and
interactions that users employ to interact with a software system. It encompasses all
visual elements on the screen, including buttons, menus, text fields, and visual layouts,
along with the user's interaction methods like clicking, typing, or swiping.
● User-centered design: The design process should prioritize user needs and
Designing a user interface for a data acquisition system depends on the specific
functionalities and target users. However, here's a general breakdown with a diagram:
Components:
gauges).
charts.
user preferences.
Diagram:
+--------------------+--------------------+--------------------+
| Data Acquisition | Data Display & | Export & Control |
| Panel | Analysis Panel | Panel |
+--------------------+--------------------+--------------------+
| - Select data source | - Display data | - Export data (CSV, |
| - Configure settings| (tables, graphs) | Excel) |
| - Real-time data (if| - Filter & analyze | - Start / Stop |
| available) | - Zoom & manipulate | acquisition |
+--------------------+--------------------+--------------------+
|
v
Settings Panel
^
|
Main Menu/Navigation
Additional Considerations:
● Feedback: Provide visual cues and messages to confirm user actions and
system responses.
Remember, this is a simplified example, and the specific design should be tailored to
the specific needs and functionalities of your data acquisition system. User research
and testing are crucial throughout the design process to ensure the UI is intuitive and
language used to visualize and document the design and structure of software
systems. It provides a set of diagrams and symbols for representing different aspects of
stakeholders.
(behaviors).
● Classes: Blueprints for creating objects, defining their attributes, methods, and
UML Diagrams:
1. Class Diagram:
● Example: A class diagram for an online bookstore might include classes like
Book, Customer, and Order, with associations like Customer placing an Order for
a Book.
2. Object Diagram:
● Example: An object diagram might show a specific Customer object (John Doe)
actors (users, external systems) and their interactions with the system.
● Example: A use case diagram might show a Customer actor interacting with the
"Buy Book" use case, involving steps like browsing books, adding items to cart,
4. Sequence Diagram:
Payment objects.
These are just a few examples, and UML offers a broader range of diagrams catering to
● Enhanced design quality: Helps identify and address potential issues early in
By learning and utilizing UML effectively, software developers can improve their design
systems.
### Cohesion:
1. **Functional Cohesion**:
- Elements within a module are related by performing a single,
well-defined task or function.
- Example: A module that calculates the square root of a
number.
2. **Sequential Cohesion**:
- Elements within a module are related by their sequential order
of execution, with output from one element serving as input to the
next.
- Example: A module that reads data from a file, processes it,
and writes the results to another file.
3. **Communicational Cohesion**:
- Elements within a module are related by the data they share or
communicate, without a specific sequential order.
- Example: A module that performs operations on a shared data
structure.
4. **Procedural Cohesion**:
- Elements within a module are related by their procedural flow,
with one element calling or invoking another to perform a series of
related tasks.
- Example: A module that initializes a database connection,
executes a query, and closes the connection.
5. **Temporal Cohesion**:
- Elements within a module are related by their temporal
proximity or occurrence within a specific time frame.
- Example: A module that performs cleanup operations at the
end of a session.
### Coupling:
1. **Content Coupling**:
- Occurs when one module directly accesses or modifies the
internal contents (e.g., data structures, variables) of another
module.
- Example: Passing pointers or references to internal data
structures.
2. **Common Coupling**:
- Occurs when multiple modules share a global data source,
such as a global variable or database.
- Example: Accessing a shared database connection from
multiple modules.
3. **Control Coupling**:
- Occurs when one module controls the behavior of another
module by passing control information, such as flags or status
codes.
- Example: Passing control flags to indicate the next operation
to perform.
4. **Stamp Coupling**:
- Occurs when modules share complex data structures or
parameters, passing them as a single data structure (e.g., a
record or struct).
- Example: Passing a structure with multiple fields as a
parameter.
5. **Data Coupling**:
- Occurs when modules communicate by passing data through
parameters or return values, without sharing global data or control
information.
- Example: Passing parameters between functions or methods.
1. **Modularity**:
- Divide the system into smaller, independent modules or
components, each responsible for a specific functionality or
aspect of the system.
- Promotes code reuse, facilitates maintenance, and supports
incremental development and testing.
2. **Abstraction**:
- Focus on essential characteristics while hiding unnecessary
implementation details.
- Emphasizes the relevant aspects of the system and manages
complexity by providing a simplified view of the system.
3. **Encapsulation**:
- Bundle data and methods that operate on the data into a
single unit called a class.
- Hides the internal state of an object and restricts access to the
object's data, promoting information hiding and reducing
dependencies between components.
4. **Separation of Concerns**:
- Divide the system into distinct areas of functionality, with each
concern addressed by a separate module or component.
- Enhances maintainability, scalability, and understandability by
isolating changes to specific areas of the system.
Q) what is DFD? Explain its functions and levels with the help of
diagram .
Data Flow Diagrams (DFDs) Explained
A Data Flow Diagram (DFD) is a graphical representation that depicts the flow of data
within a software system or information system. It visually shows the processes that
transform data, the data stores that hold the information, and the external entities that
interact with the system. DFDs are a fundamental tool in structured system analysis and
Functions of DFDs:
and users.
Levels of DFDs:
DFDs can be created at different levels of detail, providing a hierarchical view of the
system:
○ Useful for understanding the system's boundaries and its primary function.
2. Level 1 DFD:
○ Delves deeper into the single process from the context diagram, breaking
processes.
system.
DFD Symbols:
● External Entity: A square symbol representing entities outside the system that
+-----------------+ +--------------+
| Library System |-------->| Users |
+-----------------+ +--------------+
^ (borrows, returns)
|
(data about books, users)
Level 1 DFD:
+-----------------+ +--------------+
+-----------------+
| Library System |--------->| Borrow Book |--------->| Return Book |
+-----------------+ +--------------+
+-----------------+
^ | ^
| | |
(book ID, user ID) (book, user ID) (book ID)
This is a simplified example. DFDs can become more complex depending on the
system's functionality. However, they remain a valuable tool for visualizing and
Explanation:
● The Banking System is the central process, interacting with two external
entities:
Level 1 DFD:
Explanation:
information.
information.
information.
interacts with other banks for inter-bank transfers, and potentially updates
account information.
Note: This is a simplified example, and a real-world banking system would involve
many more functionalities and data flows. However, it provides a basic understanding of
how DFDs can be used to visualize the flow of data within a banking system.
1. **Meet Requirements**:
- Ensure that the software design accurately reflects the
functional and non-functional requirements of the system as
specified by stakeholders.
1. **Requirements Analysis**:
- Review and analyze the functional and non-functional
requirements of the system to ensure a thorough understanding
of the project objectives and constraints.
2. **Conceptual Design**:
- Develop a high-level conceptual design that outlines the
overall structure, components, and interactions of the system
based on the requirements analysis.
4. **Structural Design**:
- Define the structure of the system by creating diagrams such
as class diagrams, component diagrams, and package diagrams
to illustrate the relationships between system components and
their dependencies.
5. **Behavioral Design**:
- Specify the behavior of the system by creating diagrams such
as sequence diagrams, activity diagrams, and statechart
diagrams to illustrate the flow of control and data within the
system.
6. **Interface Design**:
- Design the user interface and interaction flows by creating
wireframes, mockups, and prototypes to visualize the layout,
navigation, and functionality of the system from the user's
perspective.