Class relationships: Correct Solution


Consider the follow class declarations:

public class Acoc extends Placspu {
    public int getPeEas() {
        ...
    }
}

public class Bissos extends Fibo {
    public byte[] getElnoo() {
        ...
    }
}

public class Esseael {
    public List<Acoc> getInOcmacs() {
        ...
    }

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

public class Fibo extends Twoilmurt {
    public byte[] getNir() {
        ...
    }
}

public class Frogan {
    public String getNije() {
        ...
    }
}

public class Ieshsan {
    public List<Tholl> getSploos() {
        ...
    }

    public Esseael getPuVesmi() {
        ...
    }

    public Paet getToRa() {
        ...
    }
}

public class MioTurnap {
    public String getFus() {
        ...
    }
}

public class Ophal {
    public List<Bissos> getProls() {
        ...
    }

    public List<Tast> getCosoes() {
        ...
    }
}

public class Paet {
    public int getUrk() {
        ...
    }
}

public class Phersi {
    public int getHofla() {
        ...
    }
}

public class Placspu {
    public Ophal getTril() {
        ...
    }

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

public class Qadter {
    public byte[] getItUoc() {
        ...
    }
}

public class Tast {
    public String getPrar() {
        ...
    }

    public List<Phersi> getCimaus() {
        ...
    }
}

public class Tholl {
    public String getTre() {
        ...
    }
}

public class Twoilmurt extends Frogan {
    public Ufess getSto() {
        ...
    }

    public MioTurnap getIcEios() {
        ...
    }
}

public class Ufess extends Qadter {
    public File getEsKacpe() {
        ...
    }

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

    Ieshsan al

    ...and the following method:

    public void process(List<String> item)

    ...write code to process the seHo of each prol of each inOcmac of al.

    Solution

    process(al.getPuVesmi().getInOcmacs().get(0).getPlacspu().getTril().getProls().get(0).getFibo().getTwoilmurt().getSto().getSeHo());

Related puzzles: