Professional Documents
Culture Documents
Software Engineering Homework1 Shariar (沙里尔)
Software Engineering Homework1 Shariar (沙里尔)
Software Engineering
Classwork 1
Since the functionality of the software have been broken down into atomic levels,
thus developers get a clear requirement of each and every functions and hence
designing of the software becomes easy and error free.
As the modules are independent they have limited or almost no dependency on
other modules. So, making changes in a module without affecting the whole system
is possible in this approach.
Error propagation from one module to another and further in whole system can be
neglected and it saves time during testing and debugging
2.Explain what coupling is, and list three types of Coupling in desending
order of coupling degree.
Answer:
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.
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.
Answer:
Cohesion refers to any group of things that are closely connected by a set of
common attributes. Families are cohesive through their blood bonds. Friends can be
cohesive through a common high school or shared interests. A department in a
company is cohesive because of either common responsibility.
Types of Cohesion:
Co-incidental cohesion - It is unplanned and random cohesion, which might be the
result of breaking the program into smaller modules for the sake of modularization.
Because it is unplanned, it may serve confusion to the programmers and is generally
not-accepted.
Logical cohesion - When logically categorized elements are put together into a
module, it is called logical cohesion.
Temporal Cohesion - When elements of module are organized such that they are
processed at a similar point in time, it is called temporal cohesion.
Procedural cohesion - When elements of module are grouped together, which are
executed sequentially in order to perform a task, it is called procedural cohesion.
Communicational cohesion - When elements of module are grouped together,
which are executed sequentially and work on same data (information), it is called
communicational cohesion.
Sequential cohesion - When elements of module are grouped because the output
of one element serves as input to another and so on, it is called sequential cohesion.
Functional cohesion - It is considered to be the highest degree of cohesion, and it
is highly expected. Elements of module in functional cohesion are grouped because
they all contribute to a single well-defined function. It can also be reused.
Answer:
Error isolation
Module reusability
A functionally independent module performs some well-defined and specific task. So,
it becomes easy to reuse such modules in different program requiring same
functionality.
Understandability