SE Unit-3 Meterial
SE Unit-3 Meterial
SE Unit-3 Meterial
UNIT III
Software design
Abstraction
Modularity
Software Architecture
Effective modular design : Cohesion and Coupling
Architectural design and Procedural design
Data flow oriented design.
1 Page
Highest level of abstraction : Solution is slated in broad terms using the language of the
problem environment
Department of Computer Science, TJPS College, Guntur
III B.Sc Sem-5 Software Engineering
architecture,
(2) to provide detailed guidelines for representing an architectural description, and
cohesive.
logically cohesive : A module that performs tasks that are related logically. e.g. , a module that
produces all output regardless of type.
Temporal cohesion : When a module contains tasks that are related by the fact that all must be
executed with the same span of time, the module exhibits.
It performs the following tasks:
(1) computes supplementary data based on original computed data,
(2) produces an error report (with graphical content) on the user's workstation,
(3) performs follow-up calculations requested by the user,
(4) updates a database, and
(5) enables menu selection for subsequent processing
procedural cohesion : When processing elements of a module are related and must be executed
in a specific order.
communicational cohesion : When all processing elements concentrate on one area of a data
structure.
3. Coupling : Coupling is a measure of interconnection among modules in a software structure.
Coupling depends on the interface complexity between modules.
Examples of different types of module coupling: Modules a and d are subordinate to different
modules. Module c is subordinate to module a and is accessed via a conventional argument list,
through which data are passed.
Data coupling : Operation A() passes one or more atomic data operands to operation B(); the
less the number of operands, the lower the level of coupling.
Stamp coupling: A whole data structure or class instantiation is passed as a parameter to an
operation.
6
Page
Control coupling: Operation A() invokes operation B() and passes a control flag to B that
directs logical flow within B(). Consequently, a change in B() can require a change to be made
to the meaning of the control flag passed by A(), otherwise an error may result.
Common coupling : A number of components all make use of a global variable, which can lead
to uncontrolled error propagation and unforeseen side effects.
Content coupling : One component secretly modifies data that is stored internally in another
component.
Other kinds of coupling
Subroutine call coupling : When one operation is invoked it invokes another operation within
side of it.
Type use coupling : Component A uses a data type defined in component B, such as for an
instance variable or a local variable declaration. If the type definition changes, every component
that declares a variable of that data type must also change
Inclusion or import coupling : Component A imports or includes the contents of component B.
External coupling : A component communicates or collaborates with infrastructure components
that are entities external to the software (e.g., operating system functions, database functions,
networking functions).
--------------------------------------XXXXXXXXXXXXXX------------------------------------------
6. Explain the Architectural design and Procedural design?
Architectural design: Architectural design begins, the software to be developed must be put
into context. The design should define the external entities.
1. Representing the System in Context :
Superordinate systems: Those systems that use the target system as part of some
higher-level processing scheme.
Subordinate systems : Those systems that are used by the target system and provide
data or processing that are necessary to complete target system functionality.
Peer-level systems : Those systems that interact on a peer-to-peer basis (i.e., information
is either produced or consumed by the peers and the target system.
Actors : Entities (people, devices) that interact with the target system by producing or
consuming information that is necessary for requisite processing.
7
Page
2. Defining Archetypes: An archetype is a class or pattern that represents a core abstraction that
is critical to the design of an architecture for the target system.
Node : Represents a cohesive collection of input and output elements of the home security
function. For example a node might be comprised of (1) various sensors and (2) a variety of
alarm (output) indicators.
Detector : An abstraction that encompasses all sensing equipment that feeds information into
the target system.
8
Page
Indicator : An abstraction that represents all mechanisms (e.g., alarm siren, flashing lights, bell)
for indicating that an alarm condition is occurring.
Controller : An abstraction that depicts the mechanism that allows the arming or disarming of a
node. If controllers reside on a network, they have the ability to communicate with one another.
3. Refining the Architecture into Components : software architecture is refined into
components, the structure of the system begins to emerge.
External communication management : Coordinates communication of the security
function with external entities such as other Internet-based systems and external alarm
notification.
Control panel processing: Manages all control panel functionality.
Detector management: Coordinates access to all detectors attached to the system.
Alarm processing: Verifies and acts on all alarm conditions.
4. Describing Instantiations of the System : To accomplish this, an actual instantiation of the
architecture is developed. The architecture is applied to a specific problem with the intent of
demonstrating that the structure and components. The detector management component interacts
with a scheduler infrastructure component that implements polling of each sensor object used by
the security system.
9
Page
Procedural design : Procedural design are data flow diagrams and structure charts.
Data Flow Diagrams : A data flow diagram (or DFD) is a tool to help you discover and
document the program’s major processes.
Structure Charts : A structure chart is a tool to help you derive and document the program’s
architecture. It is similar to an organization chart.
When a component is divided into separate pieces, it is called the parent and its pieces are
10
Entities : Entities are sources and destinations of information data. Entities are
represented by rectangles with their respective names.
Process : Activities and action taken on the data are represented by Circle or Round-
edged rectangles.
Data Storage : There are two variants of data storage - it can either be represented as a
rectangle with absence of both smaller sides or as an open-sided rectangle with only one
side missing.
Data Flow : Movement of data is shown by pointed arrows. Data movement is shown
from the base of arrow as its source towards head of the arrow as destination.
Levels of DFD
Level 0 : Highest abstraction level DFD is known as Level 0 DFD, which depicts the
entire information system as one diagram concealing all the underlying details. Level 0
DFDs are also known as context level DFDs.
11
Page
Level 1 : The Level 0 DFD is broken down into more specific, Level 1 DFD. Level 1
DFD depicts basic modules in the system and flow of data among various modules.
Level 1 DFD also mentions basic processes and sources of information.
Level 2 - At this level, DFD shows how data flows inside the modules mentioned in
Level 1.
Higher level DFDs can be transformed into more specific lower level DFDs with deeper level of
understanding unless the desired level of specification is achieved.
12
Page