5. Why is it generally considered good practice to minimize coupling between classes?
A) Low coupling increases the operational efficiency of a program. B) High coupling implies less interface cohesion.
C) High coupling increases program maintenance and hinders code reuse. D) Low coupling decreases the probability of code redundancy.
-
6. Which of the following represents a good strategy regarding cohesion and coupling?
A) Maximize cohesion and remove unnecessary coupling. B) Minimize cohesion and remove unnecessary coupling..
C) Maximize both cohesion and coupling. D) Minimize cohesion and maximize coupling.
-
7. Which type of method modifies the object on which it is invoked?
A) Constructor method. B) Static method. C) Accessor method. D) Mutator method
-
8. The String class is an example of which of the following types of classes?
A) Static class. B) Immutable class. C) Abstract class. D) Mutable class.
5). High coupling increases program maintenance and hinders code reuse
Coupling is nothing but the amount of communication between classes which breaks the concept of information. overall coupling is not possible to remove between classes but there is a chance of minimizing.
6). Maximize cohesion and remove unnecessary coupling
we must focus only on high cohesion and low coupling
7). Mutator method
It is employed for changing the object state that is invoked and often known as the update method.
8).Immutable class
Making the string as immutable leads to the instance that is promised to be in the same across its overall duration.
Get Answers For Free
Most questions answered within 1 hours.