Using reference variable for an interface type instead of a class implementing the interface
Answer: Low Coupling
Identify the situation described on the left by the terms specified on the bottom:
1)Using reference variable of an interface type instead of a class implementing the interface // what?
2)A class that provides only one specific functionality //ok. high cohesion
3)A class that directly accesses the members of another class
//ok. high coupling
4)Changing the implementation of a class doesn't affect the classes that use it.
//ok. low coupling
Options:
Low coupling
High coupling
Low cohesion
High cohesion
Using reference variable for an interface type instead of a class implementing the interface
Answer: Low Coupling
But flexibility and low-coupling are related??
Using reference variable of an interface type instead of a class implementing the interface ==> signifies low coupling
On my planet I'm considered quite beautiful. Thanks to the poetry in this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|