Class relationships: Correct Solution


Consider the follow class declarations:

public class Bian extends Pomtent {
    public byte[] getPaess() {
        ...
    }
}

public class CedPirjan {
    public List<Reec> getMenchs() {
        ...
    }

    public Trudlan getIrdad() {
        ...
    }
}

public class PaeDetglin {
    public List<String> getWakol() {
        ...
    }
}

public class Paia extends Scremte {
    public List<Raxcon> getIogoses() {
        ...
    }

    public List<PaeDetglin> getTuesses() {
        ...
    }

    public Bian getJeDoilt() {
        ...
    }
}

public class Pomtent {
    public byte[] getMioc() {
        ...
    }

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

public class Raxcon {
    public String getCalle() {
        ...
    }
}

public class Reec extends Paia {
    public String getEssba() {
        ...
    }
}

public class Scremte {
    public byte[] getEoTweni() {
        ...
    }
}

public class Speidia {
    public CedPirjan getOsshe() {
        ...
    }

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

public class Trudlan {
    public byte[] getEsPle() {
        ...
    }
}
  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:

    Speidia bili

    ...and the following method:

    public void process(List<String> item)

    ...write code to process the eph of each mench of bili.

    Solution

    process(bili.getOsshe().getMenchs().get(0).getPaia().getJeDoilt().getPomtent().getEph());

Related puzzles: