0% found this document useful (0 votes)
31 views

SE Unit-3 Rest Part

Uploaded by

saswatsanu2003
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)
31 views

SE Unit-3 Rest Part

Uploaded by

saswatsanu2003
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/ 12

Software Design:

Design process
The design phase of software development deals with transforming
the customer requirements as described in the SRS documents into
a form implementable using a programming language. The software
design process can be divided into the following three levels of
phases of design:
1. Interface Design
2. Architectural Design
3. Detailed Design
Elements of a System:
1. Architecture – This is the conceptual model that defines the
structure, behavior, and views of a system. We can use
flowcharts to represent and illustrate the architecture.
2. Modules – These are components that handle one specific task
in a system. A combination of the modules makes up the system.
3. Components – This provides a particular function or group of
related functions. They are made up of modules.
4. Interfaces – This is the shared boundary across which the
components of a system exchange information and relate.
5. Data – This is the management of the information and data flow.
Interface Design:

Interface design is the specification of the interaction between a


system and its environment. this phase proceeds at a high level of
abstraction with respect to the inner workings of the system i.e,
during interface design, the internal of the systems are completely
ignored and the system is treated as a black box. Attention is
focused on the dialogue between the target system and the users,
devices, and other systems with which it interacts. The design
problem statement produced during the problem analysis step
should identify the people, other systems, and devices which are
collectively called agents. Interface design should include the
following details:
 Precise description of events in the environment, or messages
from agents to which the system must respond.
 Precise description of the events or messages that the system
must produce.
 Specification of the data, and the formats of the data coming into
and going out of the system.
 Specification of the ordering and timing relationships between
incoming events or messages, and outgoing events or outputs.

Architectural Design:

Architectural design is the specification of the major components of a


system, their responsibilities, properties, interfaces, and the
relationships and interactions between them. In architectural design,
the overall structure of the system is chosen, but the internal details
of major components are ignored. Issues in architectural design
includes:
 Gross decomposition of the systems into major components.
 Allocation of functional responsibilities to components.
 Component Interfaces
 Component scaling and performance properties, resource
consumption properties, reliability properties, and so forth.
 Communication and interaction between components.
Detailed Design:

Design is the specification of the internal elements of all major


system components, their properties, relationships, processing, and
often their algorithms and the data structures. The detailed design
may include:
 Decomposition of major system components into program units.
 Allocation of functional responsibilities to units.
 User interfaces
 Unit states and state changes
 Data and control interaction between units
 Data packaging and implementation, including issues of scope
and visibility of program elements
 Algorithms and data structures

Characteristics of a good software Design


For good quality software to be produced, the software design must
also be of good quality. Now, the matter of concern is how the
quality of good software design is measured? This is done by
observing certain factors in software design. These factors are:

1. Correctness
2. Understandability
3. Efficiency
4. Maintainability

Now, let us define each of them in detail,

1) Correctness

First of all, the design of any software is evaluated for its


correctness. The evaluators check the software for every kind of
input and action and observe the results that the software will
produce according to the proposed design. If the results are correct
for every input, the design is accepted and is considered that the
software produced according to this design will function correctly.
2) Understandability

The software design should be understandable so that the


developers do not find any difficulty to understand it. Good software
design should be self- explanatory. This is because there are
hundreds and thousands of developers that develop different
modules of the software, and it would be very time consuming to
explain each design to each developer. So, if the design is easy and
self- explanatory, it would be easy for the developers to implement it
and build the same software that is represented in the design.

3) Efficiency

The software design must be efficient. The efficiency of the software


can be estimated from the design phase itself, because if the design
is describing software that is not efficient and useful, then the
developed software would also stand on the same level of efficiency.
Hence, for efficient and good quality software to be developed, care
must be taken in the designing phase itself.

4) Maintainability

The software design must be in such a way that modifications can be


easily made in it. This is because every software needs time to time
modifications and maintenance. So, the design of the software must
also be able to bear such changes. It should not be the case that
after making some modifications the other features of the software
start misbehaving. Any change made in the software design must
not affect the other available features, and if the features are getting
affected, then they must be handled properly.
Coupling and Cohesion
Coupling and Cohesion are two key concepts in software
engineering that are used to measure the quality of a software
system’s design.
Coupling refers to the degree of interdependence between software
modules. High coupling means that modules are closely connected
and changes in one module may affect other modules. Low coupling
means that modules are independent and changes in one module
have little impact on other modules.
Cohesion refers to the degree to which elements within a module
work together to fulfill a single, well-defined purpose. High cohesion
means that elements are closely related and focused on a single
purpose, while low cohesion means that elements are loosely related
and serve multiple purposes.
Both coupling and cohesion are important factors in determining the
maintainability, scalability, and reliability of a software system. High
coupling and low cohesion can make a system difficult to change
and test, while low coupling and high cohesion make a system
easier to maintain and improve.

Coupling: Coupling is the measure of the degree of interdependence


between the modules. A good software will have low coupling.
Types of Coupling:
 Data Coupling: If the dependency between the modules is based
on the fact that they communicate by passing only data, then the
modules are said to be data coupled. In data coupling, the
components are independent of each other and communicate
through data. Module communications don’t contain tramp data.
Example-customer billing system.
 Stamp Coupling In stamp coupling, the complete data structure
is passed from one module to another module. Therefore, it
involves tramp data. It may be necessary due to efficiency
factors- this choice was made by the insightful designer, not a
lazy programmer.
 Control Coupling: If the modules communicate by passing
control information, then they are said to be control coupled. It
can be bad if parameters indicate completely different behavior
and good if parameters allow factoring and reuse of functionality.
Example- sort function that takes comparison function as an
argument.
 External Coupling: In external coupling, the modules depend on
other modules, external to the software being developed or to a
particular type of hardware. Ex- protocol, external file, device
format, etc.
 Common Coupling: The modules have shared data such as
global data structures. The changes in global data mean tracing
back to all modules which access that data to evaluate the effect
of the change. So it has got disadvantages like difficulty in
reusing modules, reduced ability to control data accesses, and
reduced maintainability.
 Content Coupling: In a content coupling, one module can modify
the data of another module, or control flow is passed from one
module to the other module. This is the worst form of coupling
and should be avoided.
 Temporal Coupling: Temporal coupling occurs when two
modules depend on the timing or order of events, such as one
module needing to execute before another. This type of coupling
can result in design issues and difficulties in testing and
maintenance.
 Sequential Coupling: Sequential coupling occurs when the
output of one module is used as the input of another module,
creating a chain or sequence of dependencies. This type of
coupling can be difficult to maintain and modify.
 Communicational Coupling: Communicational coupling occurs
when two or more modules share a common communication
mechanism, such as a shared message queue or database. This
type of coupling can lead to performance issues and difficulty in
debugging.
 Functional Coupling: Functional coupling occurs when two
modules depend on each other’s functionality, such as one
module calling a function from another module. This type of
coupling can result in tightly-coupled code that is difficult to
modify and maintain.
 Data-Structured Coupling: Data-structured coupling occurs
when two or more modules share a common data structure, such
as a database table or data file. This type of coupling can lead to
difficulty in maintaining the integrity of the data structure and can
result in performance issues.
 Interaction Coupling: Interaction coupling occurs due to the
methods of a class invoking methods of other classes. Like with
functions, the worst form of coupling here is if methods directly
access internal parts of other methods. Coupling is lowest if
methods communicate directly through parameters.
 Component Coupling: Component coupling refers to the
interaction between two classes where a class has variables of
the other class. Three clear situations exist as to how this can
happen. A class C can be component coupled with another class
C1, if C has an instance variable of type C1, or C has a method
whose parameter is of type C1,or if C has a method which has a
local variable of type C1. It should be clear that whenever there is
component coupling, there is likely to be interaction coupling.

Cohesion: Cohesion is a measure of the degree to which the


elements of the module are functionally related. It is the degree to
which all elements directed towards performing a single task are
contained in the component. Basically, cohesion is the internal glue
that keeps the module together. A good software design will have
high cohesion.

Types of Cohesion:
 Functional Cohesion: Every essential element for a single
computation is contained in the component. A functional cohesion
performs the task and functions. It is an ideal situation.
 Sequential Cohesion: An element outputs some data that
becomes the input for other element, i.e., data flow between the
parts. It occurs naturally in functional programming languages.
 Communicational Cohesion: Two elements operate on the
same input data or contribute towards the same output data.
Example- update record in the database and send it to the
printer.
 Procedural Cohesion: Elements of procedural cohesion ensure
the order of execution. Actions are still weakly connected and
unlikely to be reusable. Ex- calculate student GPA, print student
record, calculate cumulative GPA, print cumulative GPA.
 Temporal Cohesion: The elements are related by their timing
involved. A module connected with temporal cohesion all the
tasks must be executed in the same time span. This cohesion
contains the code for initializing all the parts of the system. Lots
of different activities occur, all at unit time.
 Logical Cohesion: The elements are logically related and not
functionally. Ex- A component reads inputs from tape, disk, and
network. All the code for these functions is in the same
component. Operations are related, but the functions are
significantly different.
 Coincidental Cohesion: The elements are not
related(unrelated). The elements have no conceptual relationship
other than location in source code. It is accidental and the worst
form of cohesion. Ex- print next line and reverse the characters of
a string in a single component.
 Procedural Cohesion: This type of cohesion occurs when
elements or tasks are grouped together in a module based on
their sequence of execution, such as a module that performs a
set of related procedures in a specific order. Procedural cohesion
can be found in structured programming languages.
 Communicational Cohesion: Communicational cohesion occurs
when elements or tasks are grouped together in a module based
on their interactions with each other, such as a module that
handles all interactions with a specific external system or module.
This type of cohesion can be found in object-oriented
programming languages.
 Temporal Cohesion: Temporal cohesion occurs when elements
or tasks are grouped together in a module based on their timing
or frequency of execution, such as a module that handles all
periodic or scheduled tasks in a system. Temporal cohesion is
commonly used in real-time and embedded systems.
 Informational Cohesion: Informational cohesion occurs when
elements or tasks are grouped together in a module based on
their relationship to a specific data structure or object, such as a
module that operates on a specific data type or object.
Informational cohesion is commonly used in object-oriented
programming.
 Functional Cohesion: This type of cohesion occurs when all
elements or tasks in a module contribute to a single well-defined
function or purpose, and there is little or no coupling between the
elements. Functional cohesion is considered the most desirable
type of cohesion as it leads to more maintainable and reusable
code.
 Layer Cohesion: Layer cohesion occurs when elements or tasks
in a module are grouped together based on their level of
abstraction or responsibility, such as a module that handles only
low-level hardware interactions or a module that handles only
high-level business logic. Layer cohesion is commonly used in
large-scale software systems to organize code into manageable
layers.

Layered Arrangements of modules:


Software engineering is a fully layered technology, to develop
software we need to go from one layer to another. All the layers are
connected and each layer demands the fulfillment of the previous
layer. If you’re aiming to excel in roles like Software Tester, QA
Engineer, or Test Automation Engineer, explore Complete Guide to
Software Testing and Automation.

Layered technology is divided into four parts:


1. A quality focus: It defines the continuous process improvement
principles of software. It provides integrity that means providing
security to the software so that data can be accessed by only an
authorized person, no outsider can access the data. It also focuses
on maintainability and usability.
2. Process: It is the foundation or base layer of software
engineering. It is key that binds all the layers together which enables
the development of software before the deadline or on time.
Process defines a framework that must be established for the
effective delivery of software engineering technology. The software
process covers all the activities, actions, and tasks required to be
carried out for software development.

Process activities are listed below:-


 Communication: It is the first and foremost thing for the
development of software. Communication is necessary to know
the actual demand of the client.
 Planning: It basically means drawing a map for reduced the
complication of development.
 Modeling: In this process, a model is created according to the
client for better understanding.
 Construction: It includes the coding and testing of the problem.
 Deployment:- It includes the delivery of software to the client for
evaluation and feedback.
3. Method: During the process of software development the answers
to all “how-to-do” questions are given by method. It has the
information of all the tasks which includes communication,
requirement analysis, design modeling, program construction,
testing, and support.
4. Tools: Software engineering tools provide a self-operating
system for processes and methods. Tools are integrated which
means information created by one tool can be used by another.

Approaches to Software Design

1. Function Oriented Design :


Function oriented design is the result of focusing attention to the
function of the program. This is based on the stepwise refinement.
Stepwise refinement is based on the iterative procedural
decomposition. Stepwise refinement is a top-down strategy where a
program is refined as a hierarchy of increasing levels of details.
We start with a high level description of what the program does.
Then, in each step, we take one part of our high level description
and refine it. Refinement is actually a process of elaboration. The
process should proceed from a highly conceptual model to lower
level details. The refinement of each module is done until we reach
the statement level of our programming language.
2. Object Oriented Design :
Object oriented design is the result of focusing attention not on the
function performed by the program, but instead on the data that are
to be manipulated by the program. Thus, it is orthogonal to function -
oriented design. Object-oriented design begins with an examination
of the real world “things”. These things are characteristics
individually in terms of their attributes and behavior.
Objects are independent entities that may readily be changed
because all state and representation information is held within the
object itself. Object may be distributed and may execute sequentially
or in parallel. Object oriented technology contains following three
keywords –
1. Objects –
Software package are designed and developed to correspond
with real world entities that contain all the data and services to
function as their associated entities messages.

2. Communication –
Communication mechanisms are established that provide the
means by which object work together.

3. Methods –
Methods are services that objects perform to satisfy the functional
requirements of the problem domain. Objects request services of
the other objects through messages.

You might also like