Class relationships: Correct Solution


Consider the follow class declarations:

public class Cakod extends EunLian {
    public Gridpont getEsMec() {
        ...
    }
}

public class Ceoungpro extends Iocar {
    public String getElsor() {
        ...
    }
}

public class EunLian {
    public Vuou getCeTritu() {
        ...
    }

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

public class Flidrung {
    public List<Psii> getTeis() {
        ...
    }

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

public class Gridpont {
    public List<String> getCaElen() {
        ...
    }
}

public class Heso {
    public Ceoungpro getHuril() {
        ...
    }

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

public class Iocar extends Pluc {
    public List<Miou> getCihos() {
        ...
    }
}

public class Issas {
    public String getCea() {
        ...
    }
}

public class Lonpree {
    public Issas getOrbun() {
        ...
    }

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

public class Mestdan {
    public List<String> getAcs() {
        ...
    }
}

public class Miou {
    public List<Thriac> getToFizos() {
        ...
    }

    public String getFeIano() {
        ...
    }
}

public class Pluc {
    public Lonpree getEcip() {
        ...
    }

    public List<Wucrer> getCiugas() {
        ...
    }
}

public class Psii {
    public List<Skeos> getPaucs() {
        ...
    }

    public String getPlong() {
        ...
    }

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

public class Schauco {
    public byte[] getAsi() {
        ...
    }
}

public class Skeos extends Schauco {
    public int getApi() {
        ...
    }
}

public class Thriac {
    public Cakod getIrhi() {
        ...
    }

    public File getSeIpad() {
        ...
    }
}

public class Vuou extends Flidrung {
    public String getFaril() {
        ...
    }
}

public class Wucrer {
    public List<Mestdan> getBlids() {
        ...
    }

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

    Heso de

    ...and the following method:

    public void process(byte[] item)

    ...write code to process the duDehec of each tei of the first toFizo of the first ciho of de.

    Solution

    for (Miou ciho : de.getHuril().getIocar().getCihosList()) {
        for (Thriac toFizo : ciho.getToFizosList()) {
            process(toFizo.getIrhi().getEunLian().getCeTritu().getFlidrung().getTeis().get(0).getDuDehec());
        }
    }

Related puzzles: