Class relationships: Correct Solution


Consider the follow class declarations:

public class Bioupsod {
    public String getTeHipo() {
        ...
    }
}

public class Bosm {
    public List<String> getTeot() {
        ...
    }
}

public class Cend extends Launin {
    public List<Trismsoo> getOongs() {
        ...
    }
}

public class Eblom {
    public File getRinto() {
        ...
    }

    public Skungci getLolen() {
        ...
    }
}

public class Elda {
    public EloIelwes getAdItreu() {
        ...
    }

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

public class EloIelwes {
    public int getIcesm() {
        ...
    }
}

public class Glurm {
    public List<Hirphe> getCecs() {
        ...
    }

    public String getElPreme() {
        ...
    }
}

public class Hice {
    public int getZeTille() {
        ...
    }

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

public class Hirphe extends ZeoTrore {
    public File getUdVidin() {
        ...
    }
}

public class Ipre {
    public int getErm() {
        ...
    }
}

public class Jelnec {
    public int getDecri() {
        ...
    }
}

public class Launin {
    public List<Glurm> getIdcens() {
        ...
    }

    public Sidble getPeQi() {
        ...
    }

    public Nicass getGlema() {
        ...
    }
}

public class Nicass {
    public byte[] getSuCibe() {
        ...
    }
}

public class OstIlis {
    public Cend getMaur() {
        ...
    }

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

public class PhaLidlath extends Promoach {
    public int getLol() {
        ...
    }
}

public class Phoocsil extends Pistge {
    public List<PhaLidlath> getEcirs() {
        ...
    }

    public List<Jelnec> getVacnes() {
        ...
    }
}

public class Pistge extends Bioupsod {
    public List<Eblom> getAsslas() {
        ...
    }
}

public class Promoach {
    public String getFege() {
        ...
    }
}

public class Sidble {
    public File getPlic() {
        ...
    }

    public List<Elda> getAmEhels() {
        ...
    }
}

public class Skungci {
    public Ipre getIdPralk() {
        ...
    }

    public List<Vingta> getEjosts() {
        ...
    }
}

public class Trismsoo extends Bosm {
    public List<String> getNiing() {
        ...
    }
}

public class Trost {
    public Phoocsil getIsla() {
        ...
    }

    public File getWesla() {
        ...
    }
}

public class Vingta extends Hice {
    public int getGidva() {
        ...
    }
}

public class ZeoTrore {
    public Trost getCilfa() {
        ...
    }

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

    OstIlis mei

    ...and the following method:

    public void process(byte[] item)

    ...write code to process the daRenen of the first ejost of each assla of the first cec of the first idcen of mei.

    Solution

    for (Glurm idcen : mei.getMaur().getLaunin().getIdcensList()) {
        for (Hirphe cec : idcen.getCecsList()) {
            for (Vingta ejost : cec.getZeoTrore().getCilfa().getIsla().getPistge().getAsslas().get(0).getLolen().getEjostsList()) {
                process(ejost.getHice().getDaRenen());
            }
        }
    }

Related puzzles: