Class relationships: Correct Solution


Consider the follow class declarations:

public class Cophpio {
    public List<String> getPluno() {
        ...
    }
}

public class Eaiass extends OsmJeun {
    public byte[] getBidmi() {
        ...
    }

    public int getIsgi() {
        ...
    }
}

public class EntEdso extends Eaiass {
    public Cophpio getBagim() {
        ...
    }
}

public class Escamb {
    public int getVid() {
        ...
    }

    public EntEdso getOrAl() {
        ...
    }
}

public class OsmJeun {
    public byte[] getPec() {
        ...
    }
}

public class Prinhe {
    public File getDiChuc() {
        ...
    }

    public List<Escamb> getElKis() {
        ...
    }
}
  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:

    Prinhe ea

    ...and the following method:

    public void process(int item)

    ...write code to process the isgi of each elKi of ea.

    Solution

    process(ea.getElKis().get(0).getOrAl().getEaiass().getIsgi());

Related puzzles: