Class relationships: Correct Solution


Consider the follow class declarations:

public class Chrocne {
    public File getInse() {
        ...
    }
}

public class CuxWella extends Presm {
    public Silbur getAtpi() {
        ...
    }
}

public class Dalshi {
    public List<String> getHeao() {
        ...
    }
}

public class Daon extends Odtriu {
    public List<Phofrep> getEdCis() {
        ...
    }
}

public class Emis {
    public File getAgeng() {
        ...
    }

    public List<Vadvirl> getEeCils() {
        ...
    }
}

public class HecAshcim {
    public int getQoHi() {
        ...
    }
}

public class Misma extends Sclollea {
    public byte[] getPocso() {
        ...
    }
}

public class Odtriu {
    public List<String> getOwdu() {
        ...
    }
}

public class Pagh {
    public List<Chrocne> getTiSabros() {
        ...
    }

    public Misma getSeEle() {
        ...
    }
}

public class Phofrep {
    public HecAshcim getOiRusti() {
        ...
    }

    public String getGlon() {
        ...
    }
}

public class Pousma {
    public List<Pagh> getGoIshes() {
        ...
    }

    public Daon getBaEa() {
        ...
    }
}

public class Presm {
    public List<String> getGrio() {
        ...
    }
}

public class Schardiosh {
    public List<String> getCung() {
        ...
    }

    public List<CuxWella> getGlels() {
        ...
    }
}

public class Sclollea {
    public VenEshank getSte() {
        ...
    }

    public File getCeng() {
        ...
    }
}

public class Silbur extends Emis {
    public File getTeSelta() {
        ...
    }
}

public class Vadvirl {
    public Dalshi getIlHoil() {
        ...
    }

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

    public byte[] getIssen() {
        ...
    }
}

public class VenEshank extends Schardiosh {
    public List<String> getRoosh() {
        ...
    }
}

public class Vess {
    public int getPecir() {
        ...
    }
}
  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:

    Pousma osen

    ...and the following method:

    public void process(byte[] item)

    ...write code to process the issen of the first eeCil of each glel of each goIshe of osen.

    Solution

    for (Vadvirl eeCil : osen.getGoIshes().get(0).getSeEle().getSclollea().getSte().getSchardiosh().getGlels().get(0).getAtpi().getEmis().getEeCilsList()) {
        process(eeCil.getIssen());
    }

Related puzzles: