Question: The idea behind the adapter design pattern is to take two classes that are not Liskov - compatible due to their public interfaces and make

The idea behind the adapter design pattern is to take two classes that are not Liskov-compatible due to their public interfaces and make them so by writing an intermediate layer of software that translates between one set of method calls to another (with a little extra work).
Consider a system that delivers notifications to its users. The Notification interface looks like this:
public interface Notification { void setRecipient(User recipient); void setSender(User sender); void setMessage(String message); String getMessage(); }

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!