Wa0010.
Wa0010.
Wa0010.
Software Design
Software Design
Software design is a mechanism to transform user requirements into some suitable form, which helps the
programmer in software coding and implementation. It deals with representing the client's requirement, as
described in SRS (Software Requirement Specification) document, into a form, i.e., easily implementable using
programming language.
The software design phase is the first step in SDLC (Software Design Life Cycle), which moves the concentration
from the problem domain to the solution domain. In software design, we consider the system to be a set of
components or modules with clearly defined behaviors & boundaries.
Software Design
Software Design
1. Software design principles are concerned with providing means to handle the complexity of the design
process effectively. Effectively managing the complexity will not only reduce the effort needed for design
but can also reduce the scope of introducing errors during design.
Software Design Principles
1 Problem Partitioning
For small problem, we can handle the entire problem at once but for the significant problem, divide the problems
and conquer the problem it means to divide the problem into smaller pieces so that each piece can be captured
separately.
For software design, the goal is to divide the problem into manageable pieces.
Each module is a well-defined system that can be used with other applications.
Disadvantages of Modularity
1. Top-down Approach
2. Bottom-up Approach
Strategy of Design
1. Top-down Approach: This approach starts with the identification of the main components and then
decomposing them into their more detailed sub-components.
Strategy of Design
2. Bottom-up Approach: A bottom-up approach begins with the lower details and moves towards up the
hierarchy, as shown in fig. This approach is suitable in case of an existing system.
Coupling and Cohesion
Module Coupling
In software engineering, the coupling is the degree of interdependence between software modules. Two modules
that are tightly coupled are strongly dependent on each other. However, two modules that are loosely coupled are
not dependent on each other. Uncoupled modules have no interdependence at all within them.
A good design is the one that has low coupling. Coupling is measured by the number of relations between the
modules. That is, the coupling increases as the number of calls between modules increase or the amount of
shared data is large. Thus, it can be said that a design with high coupling will have more errors.
1. No Direct Coupling: There is no direct coupling between M1 and M2.
In this case, modules are subordinates to different modules. Therefore, no direct coupling.
2. Data Coupling: When data of one module is passed to another module, this is called data coupling.
3. Stamp Coupling: Two modules are stamp coupled if they communicate using composite data items such as structure, objects, etc.
When the module passes non-global data structure or entire structure to another module, they are said to be stamp coupled. For
example, passing structure variable in C or object in C++ language to a module.
4. Control Coupling: Control Coupling exists among two modules if data from one module is used to direct the structure of instruction
execution in another.
5. External Coupling: External Coupling arises when two modules share an externally imposed data format, communication protocols,
or device interface. This is related to communication to external tools and devices.
6. Common Coupling: Two modules are common coupled if they share information through some global data items.
7. Content Coupling: Content Coupling exists among two modules if they share code, e.g., a branch from one module
into another module.