0% found this document useful (0 votes)
56 views9 pages

SEPM ct-2

The document discusses the concept of modularity in software design. It explains that modularity refers to breaking a software system into separate, interchangeable components called modules. This allows for easier maintenance, testing and code reusability. It then discusses the need for modularity and benefits like managing complexity, code reusability, maintenance and evolution. Finally, it provides examples of modularity in practices like OOP, microservices architecture and component-based development.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views9 pages

SEPM ct-2

The document discusses the concept of modularity in software design. It explains that modularity refers to breaking a software system into separate, interchangeable components called modules. This allows for easier maintenance, testing and code reusability. It then discusses the need for modularity and benefits like managing complexity, code reusability, maintenance and evolution. Finally, it provides examples of modularity in practices like OOP, microservices architecture and component-based development.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

UNIT-III

1. Explain the concept of modularity in software design.


ANS- Modularity is a fundamental concept in software engineering that refers to the practice of
breaking up a software system into separate, interchangeable components called modules. These
modules are designed to be relatively independent of each other, allowing for easier
maintenance, testing, and reusability of code.

The Need for Modularity

Modularity addresses several key challenges in software development:

1. Complexity Management: As software systems grow in size and complexity, managing


and understanding the entire codebase becomes increasingly difficult. Modularity helps
by breaking down the system into smaller, more manageable parts.

2. Code Reusability: Modular code is easier to reuse across different parts of a system or in
different projects. This can lead to significant time and cost savings, as developers can
leverage existing modules rather than reinventing the wheel.

3. Maintenance and Evolution: Modular code is easier to maintain and evolve over time.
When a change is needed, developers can focus on the relevant module without affecting
the rest of the system, reducing the risk of unintended side effects.
Benefits of Modularity

Modularity offers several benefits to software development:

1. Scalability: Modular designs are more scalable, as new functionality can be added by
creating new modules or extending existing ones without affecting the entire system.

2. Maintainability: Modular code is easier to maintain, as changes can be localized to


specific modules, reducing the risk of introducing bugs or unintended side effects.

3. Reusability: Modular code is more reusable, as modules can be used in different parts of
the system or in different projects.

4. Testability: Modular code is easier to test, as individual modules can be tested in


isolation, making it easier to identify and fix bugs.

Examples of Modularity in Practice

Modularity is a widely used concept in software development, and it is employed in various


technologies and methodologies. Some examples include:

1. Object-Oriented Programming (OOP): OOP encourages modularity through the use of


classes and objects, which encapsulate data and behavior into reusable components.

2. Microservices Architecture: In microservices architecture, applications are built as a


collection of loosely coupled services, each representing a specific business capability.
This allows for independent development, deployment, and scaling of each service.

3. Component-Based Development: Component-based development involves building


software systems from reusable components, which are typically designed to be
independent and interchangeable.

4. Modular Frameworks and Libraries: Many programming languages and frameworks


provide support for modularity, allowing developers to build modular applications more
easily.
2. Write the difference bw cohesion and coupling.
ANS-

What is Cohesion:

Cohesion is the indication of the relationship within the module. It is the concept of intro-
module. Cohesion has many types but usually, high cohesion is good for software.

What is Coupling:

Coupling is also the indication of the relationships between modules. It is the concept of the
Inter-module. The coupling has also many types but typically, the low coupling is good for
software.

Differences between Coupling and Cohesion

The differences between cohesion and coupling are given below:


Cohesion Coupling

Cohesion is the concept of intro-module. Coupling is the concept of inter-module.

Cohesion represents the relationship within a Coupling represents the relationships between
module. modules.

Increasing cohesion is good for software. Increasing coupling is avoided for software.

Cohesion represents the functional strength of Coupling represents the independence among
modules. modules.

Highly cohesive gives the best software. Whereas loosely coupling gives the best
software.

In cohesion, the module focuses on a single In coupling, modules are connected to the other
thing. modules.

Cohesion is created between the same module. Coupling is created between two different
modules.

There are Six types of Cohesion There are Six types of Coupling

1. Functional Cohesion. 1. Common Coupling.


2. Procedural Cohesion. 2. External Coupling.
3. Temporal Cohesion. 3. Control Coupling.
4. Sequential Cohesion. 4. Stamp Coupling.
5. Layer Cohesion. 5. Data Coupling
6. Communication Cohesion. 6. Content Coupling.
3. Define layering.
ANS-

In software engineering, "layering" refers to a design principle where the software system is
structured into layers, with each layer responsible for a specific set of tasks and having defined
interactions with other layers.

Layering helps in achieving scalability, flexibility, and maintainability of software systems.

4. Explain DFD with suitable example.


ANS-

DFD stands for Data Flow Diagram, which is a graphical representation used in software
engineering and business analysis to model the flow of data within a system. It visually
illustrates how data moves through processes and data stores in a system, showing how inputs
are transformed into outputs.

Here are the key components and concepts of a Data Flow Diagram (DFD):

1. Processes: Processes represent functions or activities that transform input data into
output data. Each process is depicted as a rectangle in the DFD diagram. Processes can
range from simple operations (like calculations) to complex operations (like data
transformations or business logic).

2. Data Flows: Data flows represent the movement of data between various parts of the
system. They are represented by arrows and show the direction of data flow. Data flows
can represent inputs to processes, outputs from processes, or data exchanged between
different components of the system.

3. Data Stores: Data stores represent repositories where data is persisted. These can be
databases, files, or any storage mechanism. Data stores are represented by open-ended
rectangles. They show where data is stored and retrieved as part of the system's
processes.

4. External Entities: External entities represent sources or destinations of data that interact
with the system but are outside of the system's control. They can be users, other systems,
or devices. External entities are shown as squares on the boundary of the DFD diagram.
Key characteristics and benefits of using Data Flow Diagrams include:

1. Simple Visualization: DFDs use easy-to-understand diagrams to show how data moves
in a system.

2. Clarity: They provide a clear picture of data flow, making it easy to see where data
comes from, how it's processed, and where it goes.

3. Focus on Data: DFDs emphasize data flow and interactions, helping in system planning
without getting bogged down in technical details.

4. Structured Levels: They can be organized into different levels of detail, from a big-
picture view to specific process details.

5. Effective Communication: DFDs help in explaining system behavior and requirements


to stakeholders through visual representations.
5. Explain structure chart and also provide an example of it.
ANS- A structure chart is a diagrammatic representation of a software system’s components,
showcasing the hierarchical relationship between modules.

It is a static system representation, focusing on the structure rather than the process.

Structure charts are primarily used in top-down modular design and structured programming,
where the system is broken down into manageable modules.

Symbols in Structured Chart

1. Module

It represents the process or task of the system.

2. Conditional Call

It represents that control module can select any of the sub module on the basis of some
condition.
3. Loop (Repetitive call of module)It represents the repetitive execution of module by the sub
module. A curved arrow represents a loop in the module.All the submodules cover by the loop
repeat execution of module.

4. Data Flow

It represents the flow of data between the modules. It is represented by a directed arrow with an
empty circle at the end.
5. Control Flow

It represents the flow of control between the modules. It is represented by a directed arrow with
a filled circle at the end.

6. Physical Storage

It is that where all the information are to be stored.

Example

Structure chart for an Email server

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy