Class relationships: Correct Solution


Consider the follow class declarations:

public class Atel {
    public List<Rerk> getPepas() {
        ...
    }

    public String getHelia() {
        ...
    }
}

public class Biadcen {
    public List<String> getFlir() {
        ...
    }
}

public class Bral {
    public List<Trioc> getMisms() {
        ...
    }

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

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

public class Budhud {
    public Ecdod getSton() {
        ...
    }

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

public class CeaUsi extends Eessrhe {
    public List<Hongad> getNoTrens() {
        ...
    }
}

public class Daidant {
    public byte[] getBril() {
        ...
    }
}

public class Ecdod {
    public File getDiMisti() {
        ...
    }
}

public class EceEsgu extends Biadcen {
    public int getInSas() {
        ...
    }
}

public class Eessrhe {
    public List<String> getSpoa() {
        ...
    }
}

public class Essno {
    public Mounan getEpiss() {
        ...
    }

    public String getHecin() {
        ...
    }
}

public class Ewlte {
    public List<Daidant> getBrips() {
        ...
    }

    public List<Essno> getPrengs() {
        ...
    }
}

public class Hongad {
    public Atel getDaCipal() {
        ...
    }

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

public class Mantiang {
    public List<String> getMasaf() {
        ...
    }
}

public class Mounan extends Vorment {
    public List<Mantiang> getPrucas() {
        ...
    }

    public Poojeor getCuRe() {
        ...
    }
}

public class Neneoss extends Ewlte {
    public String getBiPoada() {
        ...
    }
}

public class Poojeor {
    public File getCiPo() {
        ...
    }
}

public class Rerk extends Snech {
    public int getPerb() {
        ...
    }
}

public class Snech {
    public List<EceEsgu> getRuls() {
        ...
    }

    public Bral getAtTo() {
        ...
    }
}

public class Trioc {
    public File getMoIbil() {
        ...
    }

    public Budhud getVor() {
        ...
    }
}

public class Vorment {
    public int getSaQial() {
        ...
    }

    public CeaUsi getBress() {
        ...
    }
}
  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:

    Neneoss uss

    ...and the following method:

    public void process(byte[] item)

    ...write code to process the opraw of each pepa of each noTren of the first preng of uss.

    Solution

    for (Essno preng : uss.getEwlte().getPrengsList()) {
        process(preng.getEpiss().getVorment().getBress().getNoTrens().get(0).getDaCipal().getPepas().get(0).getSnech().getAtTo().getOpraw());
    }

Related puzzles: