Question: 6) Following class and interface are given. Apply the corresponding design pattern to implement the classes described (45 Points) public interface Quackable { void quack();


6) Following class and interface are given. Apply the corresponding design pattern to implement the classes described (45 Points) public interface Quackable { void quack(); } public class Goose { public void honk () { System.out.println("Honk"); } } B) How can we add the ability to count number of quack called without having to change any existing implementation of the Quackable interface? Implement your class and write the name of the design pattern you applied. (15 Points) (Objective-3)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
