Class relationships: Correct Solution


Consider the follow class declarations:

public class Angnir {
    public List<String> getHoMio() {
        ...
    }
}

public class Beur extends Wrevon {
    public byte[] getSkem() {
        ...
    }
}

public class Bian {
    public int getLoOc() {
        ...
    }
}

public class Chedas {
    public File getPoc() {
        ...
    }
}

public class Dach extends PriCechian {
    public List<Emmerm> getTians() {
        ...
    }
}

public class Dolrer {
    public List<String> getElFrent() {
        ...
    }
}

public class Emmerm {
    public List<String> getMunno() {
        ...
    }
}

public class Esios {
    public String getArPazar() {
        ...
    }
}

public class FelEsi {
    public File getEunna() {
        ...
    }

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

public class Fiarma extends Dach {
    public List<String> getTioc() {
        ...
    }
}

public class Gacacs {
    public int getIfroo() {
        ...
    }
}

public class Gawhep {
    public int getPado() {
        ...
    }

    public Orlio getRess() {
        ...
    }
}

public class Ined {
    public Chedas getAdxi() {
        ...
    }

    public Fiarma getTuar() {
        ...
    }
}

public class Joscop extends Angnir {
    public byte[] getCuIcor() {
        ...
    }
}

public class Kamess {
    public String getIrLem() {
        ...
    }
}

public class Nengthaes {
    public List<Gawhep> getSeEcids() {
        ...
    }

    public List<Gacacs> getEtucks() {
        ...
    }
}

public class Orlio {
    public List<Ined> getIrerks() {
        ...
    }

    public String getQeurs() {
        ...
    }
}

public class PriCechian extends Bian {
    public FelEsi getProin() {
        ...
    }
}

public class Sierl extends Nengthaes {
    public List<Vedi> getTecus() {
        ...
    }
}

public class Tauerm extends Dolrer {
    public Beur getEuPa() {
        ...
    }
}

public class Vedi {
    public Kamess getTrili() {
        ...
    }

    public Esios getRipro() {
        ...
    }
}

public class Wrevon {
    public List<Joscop> getShils() {
        ...
    }

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

    Tauerm zaee

    ...and the following method:

    public void process(byte[] item)

    ...write code to process the nes of the first irerk of the first seEcid of each anIwec of zaee.

    Solution

    for (Gawhep seEcid : zaee.getEuPa().getWrevon().getAnIwecs().get(0).getNengthaes().getSeEcidsList()) {
        for (Ined irerk : seEcid.getRess().getIrerksList()) {
            process(irerk.getTuar().getDach().getPriCechian().getProin().getNes());
        }
    }

Related puzzles: