Class relationships: Correct Solution


Consider the follow class declarations:

public class Adel {
    public List<Merdze> getLeShiods() {
        ...
    }

    public List<Islox> getEmias() {
        ...
    }
}

public class Cracar extends PloKedarg {
    public List<String> getFao() {
        ...
    }
}

public class Durmen extends Prir {
    public Speon getFruc() {
        ...
    }
}

public class Islox {
    public int getAmTre() {
        ...
    }
}

public class Merdze {
    public List<Cracar> getBics() {
        ...
    }

    public Durmen getGeGi() {
        ...
    }
}

public class PloKedarg {
    public byte[] getSataw() {
        ...
    }
}

public class Prir extends Scuergam {
    public List<String> getHiTioe() {
        ...
    }
}

public class Scuergam {
    public Selir getWhic() {
        ...
    }

    public List<String> getCaweg() {
        ...
    }
}

public class Selir {
    public byte[] getRaIcass() {
        ...
    }

    public List<String> getCoshe() {
        ...
    }
}

public class Speon {
    public File getErLiac() {
        ...
    }
}
  1. Draw a diagram showing the class relationships.

    You only need to diagram the classes listed above. You only need to show the name of each class; do not show their methods or properties.

    Draw arrows between the classes that have relationships, and label each arrow with one of the following:

    Make sure your arrows point in the correct direction!

    Solution

  2. Given the following variable:

    Adel uwar

    ...and the following method:

    public void process(List<String> item)

    ...write code to process the coshe of each leShiod of uwar.

    Solution

    process(uwar.getLeShiods().get(0).getGeGi().getPrir().getScuergam().getWhic().getCoshe());

Related puzzles: