Card 8 / 72: You are trying to add a class already written in another application to serve clients, beside other classes, in your system. All other classes have the same interface, the incoming class has a totally different interface than the clients expect, but contains all required functionalities. What kind of refactoring is needed to make this class fit in with minimum changes in your system?
A)
apply the Proxy Pattern
B)
apply the Adapter Pattern
C)
create a new class which implements the expected interface and copy and paste the code from the class in the other application to this new class
Answer:
B) apply the Adapter Pattern
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |
|