diff --git a/DTRAM/src/adapter/Adapter.java b/DTRAM/src/adapter/Adapter.java new file mode 100644 index 0000000..3573a8b --- /dev/null +++ b/DTRAM/src/adapter/Adapter.java @@ -0,0 +1,29 @@ +package adapter; + +public class Adapter { + private FishingBoat fishingBoat; + private FishingBoatAdapter fishingBoatAdapter; + private Captain captain; + + public Adapter() { + fishingBoat = new FishingBoat(); + fishingBoatAdapter = new FishingBoatAdapter(fishingBoat); + captain = new Captain(fishingBoatAdapter); + } + + public void sail(String message) { + this.fishingBoat.sail(message); + } + + public String getFishingBoatAdapter() { + return fishingBoatAdapter.getValue(); + } + + public String getCaptain() { + return captain.getValue(); + } + + public String getFishingBoat() { + return fishingBoat.getValue(); + } +} \ No newline at end of file