Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Chongqing University of Technology

Software Engineering
Classwork 1

Student Name: Shariar Hossain(沙里尔)

Student ID: 62018040007

1. Why a good design should be modular, and how to measure weather


a good design is modular?
Answer:

As mentioned earlier, modular design (or modularity) is an approach used to design


various products or applications – by breaking it down into separate or independent
parts. These individual parts (for example, a laptop battery) can then be used for the
same functionality in different systems or products. A creative leader chooses
modular designs for their products because of its many benefits.
Thus, in order to solve this problem, the developing team breakdown the complete
software into various modules. A module is defined as the unique and addressable
components of the software which can be solved and modified independently
without disturbing (or affecting in very small amount) other modules of the software.
Thus, every software design should follow modularity.
The advantages of modular design:

➢ Easy communication: within the designer and developer due to standardized


naming
➢ Simple changes across the design
➢ More organized content: clear boundaries within clean – looking elements
➢ Decreased production time
➢ Easier navigation: users find the information they want easier due to the clear
separation between elements
➢ Highly responsive: it can be adapted to mobile devices easier

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.

❖ Types of Module Coupling:

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.

3. Explain what Cohesion is, and list three types of Cohesion.

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.

4. List the Advantages of functional independence

Answer:
Error isolation

When a module is functionally independent then it performs most of its task


independently without interacting with other modules much. This reduces the
chances of error getting propagated to other modules. This helps in easily isolating
and tracing the error.

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

A functionally independent module is less complex so easy to understand. Since


such modules are less interaction with other modules so can be understood in
isolation.
THE END

You might also like