Newer
Older
GeneratedDesignPatternsByDTRAM / DTRAM / src / adapter / Adapter.java
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();
    }
}