Class relationships: Correct Solution


Consider the follow class declarations:

public class Ciok {
    public List<Horo> getDiCarms() {
        ...
    }

    public Sionpis getWisor() {
        ...
    }
}

public class Enash {
    public byte[] getMishe() {
        ...
    }
}

public class Ghalcho extends Prail {
    public String getIast() {
        ...
    }

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

public class Goim extends Phalsir {
    public String getAdOr() {
        ...
    }
}

public class Horo {
    public byte[] getFeExe() {
        ...
    }
}

public class Mamis {
    public List<Goim> getTaCos() {
        ...
    }

    public List<Niken> getPiAuns() {
        ...
    }
}

public class Niken {
    public byte[] getEaFria() {
        ...
    }
}

public class Phalsir {
    public Ghalcho getIus() {
        ...
    }

    public Enash getBasud() {
        ...
    }
}

public class Prail {
    public int getSto() {
        ...
    }
}

public class Sionpis extends Mamis {
    public int getLul() {
        ...
    }
}
  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:

    Ciok dape

    ...and the following method:

    public void process(List<String> item)

    ...write code to process the phiot of each taCo of dape.

    Solution

    process(dape.getWisor().getMamis().getTaCos().get(0).getPhalsir().getIus().getPhiot());

Related puzzles: