Class relationships: Correct Solution


Consider the follow class declarations:

public class Acpran extends SesBaraw {
    public byte[] getVuss() {
        ...
    }
}

public class Basrens extends Blelcid {
    public Hepent getNex() {
        ...
    }
}

public class Blelcid extends Dushhis {
    public List<FomMeund> getNaFoses() {
        ...
    }
}

public class Congil {
    public Pedon getPilde() {
        ...
    }

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

public class Cratpad {
    public String getMiod() {
        ...
    }
}

public class Delple extends Deqi {
    public File getToAl() {
        ...
    }
}

public class Deqi {
    public int getVoPeo() {
        ...
    }
}

public class Dushhis {
    public File getEdNean() {
        ...
    }

    public List<Renme> getIeEdangs() {
        ...
    }
}

public class FomMeund {
    public List<String> getUlNirk() {
        ...
    }
}

public class Hepent {
    public List<String> getAki() {
        ...
    }
}

public class IcsUdkim {
    public String getTuIa() {
        ...
    }
}

public class Naspe {
    public byte[] getBri() {
        ...
    }

    public List<IcsUdkim> getAdLos() {
        ...
    }

    public File getIrIrpot() {
        ...
    }
}

public class PecFuec extends Delple {
    public Basrens getApDu() {
        ...
    }
}

public class Pedon {
    public byte[] getAnesh() {
        ...
    }
}

public class Renme {
    public Naspe getIss() {
        ...
    }

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

public class Sentat {
    public List<Soca> getPsoins() {
        ...
    }

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

public class SesBaraw {
    public List<PecFuec> getZirsas() {
        ...
    }

    public List<Cratpad> getPeCas() {
        ...
    }

    public Congil getCeOf() {
        ...
    }
}

public class Soca {
    public File getMonse() {
        ...
    }

    public Acpran getLia() {
        ...
    }
}
  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:

    Sentat ioss

    ...and the following method:

    public void process(File item)

    ...write code to process the irIrpot of each ieEdang of each zirsa of the first psoin of ioss.

    Solution

    for (Soca psoin : ioss.getPsoinsList()) {
        process(psoin.getLia().getSesBaraw().getZirsas().get(0).getApDu().getBlelcid().getDushhis().getIeEdangs().get(0).getIss().getIrIrpot());
    }

Related puzzles: