SE Unit-3 Rest Part
SE Unit-3 Rest Part
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:
Architectural Design:
1. Correctness
2. Understandability
3. Efficiency
4. Maintainability
1) Correctness
3) Efficiency
4) Maintainability
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.
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.