[SOLVED] River Crossing

30.00 $

Programming resource
, Digital learning resource
Categories: ,
Practical programming resource
Suitable for guided study and reference
Tutor guidance available when needed

Description

5/5 - (2 votes)

Learning Objectives

Refactor according to coding guidelines and provide a better design without modifying the functionality

Requirements

  1. Factory Pattern Add class DuckFactory to the simulator. The duck factory should handle the creation of all ducks. It will have a method called createDuck
  2. Adapter Pattern – Write an adapter called GooseDuck
  3. Observer Pattern – Use the Java Observable class and Observer interface to implement the observer pattern. The duck factory will be the subject (observable) and the duck will be the potential observers.
  4. Decorator Pattern – Add an abstract decorator class Bling to ducks. You should have 3 types of bling represented by the following classes: StarBling, MoonBling, and CrossBling.
  5. Strategy Pattern – Use the Strategy Pattern to encapsulate flying behavior and quacking behavior.
Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.