Class relationships: Correct Solution


Consider the follow class declarations:

public class Banirt {
    public PraPherphpe getEci() {
        ...
    }

    public List<Rost> getPris() {
        ...
    }
}

public class Dicess extends Juec {
    public List<Isec> getElTrirs() {
        ...
    }
}

public class Eang {
    public List<String> getWhe() {
        ...
    }
}

public class Eeam extends Espresm {
    public byte[] getMeosm() {
        ...
    }
}

public class Espresm {
    public String getEght() {
        ...
    }

    public File getPoOntho() {
        ...
    }
}

public class Fiso {
    public List<Phass> getIacs() {
        ...
    }

    public int getCoen() {
        ...
    }
}

public class Irpsus {
    public int getMapal() {
        ...
    }
}

public class Isec extends Eang {
    public List<Irpsus> getNesases() {
        ...
    }
}

public class Jaldsea {
    public List<String> getEhon() {
        ...
    }
}

public class Juec {
    public List<String> getKiReti() {
        ...
    }
}

public class MicCrassoon {
    public String getSmert() {
        ...
    }
}

public class Odoc {
    public byte[] getEsa() {
        ...
    }
}

public class OndGalgeek {
    public int getBiwe() {
        ...
    }

    public Fiso getThel() {
        ...
    }
}

public class Phass extends UfaEdche {
    public PucBindard getPhe() {
        ...
    }
}

public class Pinse {
    public byte[] getEaro() {
        ...
    }

    public SteFecka getTocs() {
        ...
    }
}

public class PraPherphpe {
    public List<String> getFivi() {
        ...
    }
}

public class PucBindard {
    public File getSiph() {
        ...
    }
}

public class Rost extends Jaldsea {
    public List<Eeam> getCeurms() {
        ...
    }
}

public class Sphe extends OndGalgeek {
    public List<String> getItra() {
        ...
    }
}

public class SteFecka {
    public List<MicCrassoon> getHaMamps() {
        ...
    }

    public List<Sphe> getMublus() {
        ...
    }

    public Dicess getOlped() {
        ...
    }
}

public class UfaEdche {
    public Wuced getCePlic() {
        ...
    }

    public Odoc getDePi() {
        ...
    }
}

public class Wuced extends Banirt {
    public byte[] getPae() {
        ...
    }
}
  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:

    Pinse ocre

    ...and the following method:

    public void process(File item)

    ...write code to process the poOntho of each ceurm of each pri of each iac of each mublu of ocre.

    Solution

    process(ocre.getTocs().getMublus().get(0).getOndGalgeek().getThel().getIacs().get(0).getUfaEdche().getCePlic().getBanirt().getPris().get(0).getCeurms().get(0).getEspresm().getPoOntho());

Related puzzles: