Assign 3
Assign 3
ASSIGNMENT-2
1. Why are control components necessary in conventional software and are generally
not required in object-oriented software?
2. What is cohesion? What problems are likely to arise if modules have low 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.
Low cohesion is when a class does a lot of jobs that don’t have much in common.
It’s results in monolithic classes that are difficult to maintain, understand and reduces
re-usability.
When a class is designed to do many different tasks rather than focus on a single
specialized task, this class is said to be a "low cohesive" class. Low cohesive classes are
said to be badly designed, as it requires a lot of work at creating, maintaining and
updating them.
Arushi
CSE-CSF
180111900
Subject Name: Essentials of Software Engineering Subject Code: IB304
Low cohesion implies that a given module performs tasks which are not very related
to each other and hence can create problems as the module becomes large.
3. Define module coupling. Explain different types of 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 to each other and communicating
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.
• 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.
Arushi
CSE-CSF
180111900
Subject Name: Essentials of Software Engineering Subject Code: IB304
• 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.
The basic abstractions are not the real The basic abstractions, which are given to the
world functions but are the data abstraction user, are real world functions.
where the real-world entities are represented.
Functions are grouped together on the basics Functions are grouped together by which a
of the data they operate since the classes higher-level
are function is obtained.
associated with their methods.
OOD approach is mainly used for FOD approach is mainly used for computation
evolving systems which mimics a business sensitive application.
process or business case.
We decompose it in the class level. We decompose in function/procedure
level.
Bottom-up approach Top-down Approach
Arushi
CSE-CSF
180111900