Class relationships: Correct Solution


Consider the follow class declarations:

public class Astfe {
    public File getVeSqali() {
        ...
    }
}

public class Astia extends Seaer {
    public Setho getCred() {
        ...
    }
}

public class Baschint extends Onio {
    public String getPapha() {
        ...
    }
}

public class Britot {
    public Seil getUssci() {
        ...
    }

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

public class Ceckhess extends Phonghist {
    public List<Posm> getLals() {
        ...
    }
}

public class Eser {
    public List<String> getOrScea() {
        ...
    }
}

public class Fissdun extends Britot {
    public List<String> getKemsa() {
        ...
    }
}

public class HouPurt {
    public List<Strodes> getImics() {
        ...
    }

    public List<Icses> getAngs() {
        ...
    }

    public Eser getRhird() {
        ...
    }

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

public class Huthi {
    public Pruni getUdna() {
        ...
    }

    public List<Fissdun> getFuMenmis() {
        ...
    }

    public List<Vepioss> getOssnas() {
        ...
    }
}

public class Icses {
    public byte[] getJum() {
        ...
    }
}

public class Onio {
    public Ceckhess getCeNacca() {
        ...
    }

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

public class Phonghist {
    public List<Astfe> getLoImphos() {
        ...
    }

    public Psul getDoas() {
        ...
    }
}

public class Posm {
    public byte[] getTiPowus() {
        ...
    }

    public HouPurt getPona() {
        ...
    }
}

public class Pruni {
    public File getEcnel() {
        ...
    }
}

public class Psul {
    public String getToAm() {
        ...
    }
}

public class Seaer {
    public File getSchar() {
        ...
    }
}

public class Seil extends Astia {
    public File getIsbi() {
        ...
    }
}

public class Setho {
    public List<Baschint> getKestas() {
        ...
    }

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

public class Strodes {
    public List<String> getCieso() {
        ...
    }
}

public class Vepioss {
    public File getAnar() {
        ...
    }
}
  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:

    Huthi rica

    ...and the following method:

    public void process(byte[] item)

    ...write code to process the iaOuops of each lal of the first kesta of each fuMenmi of rica.

    Solution

    for (Baschint kesta : rica.getFuMenmis().get(0).getBritot().getUssci().getAstia().getCred().getKestasList()) {
        process(kesta.getOnio().getCeNacca().getLals().get(0).getPona().getIaOuops());
    }

Related puzzles: