Class relationships: Correct Solution


Consider the follow class declarations:

public class Bexil extends Disspe {
    public Redi getIsiss() {
        ...
    }

    public List<Suwhas> getMaldes() {
        ...
    }
}

public class Cedri {
    public Snordo getSaDest() {
        ...
    }

    public List<IaxOismhon> getDiIands() {
        ...
    }
}

public class Cidtra extends Intbow {
    public List<Bexil> getTeblis() {
        ...
    }
}

public class Comda {
    public List<Enca> getHaLortos() {
        ...
    }

    public Lext getIrar() {
        ...
    }
}

public class Disspe {
    public List<String> getEsUnin() {
        ...
    }
}

public class Enca extends Cedri {
    public int getSiac() {
        ...
    }
}

public class IaxOismhon {
    public String getPsed() {
        ...
    }

    public Piosas getScri() {
        ...
    }
}

public class Intbow {
    public List<String> getPlon() {
        ...
    }
}

public class Kontean {
    public int getUdTaho() {
        ...
    }
}

public class Lext {
    public int getIlIpad() {
        ...
    }
}

public class MueRoct {
    public List<Comda> getCohils() {
        ...
    }

    public File getSiOdta() {
        ...
    }
}

public class Piosas {
    public String getAscin() {
        ...
    }
}

public class Preqoul extends MueRoct {
    public String getCes() {
        ...
    }
}

public class Redi extends Riass {
    public Wenstoss getAsm() {
        ...
    }
}

public class Riass {
    public List<Kontean> getOdHonris() {
        ...
    }

    public List<Sitblad> getUnushs() {
        ...
    }

    public Preqoul getMio() {
        ...
    }
}

public class Sitblad {
    public File getFacis() {
        ...
    }
}

public class Snordo extends Teiar {
    public String getHinal() {
        ...
    }
}

public class Suwhas {
    public List<String> getEzas() {
        ...
    }
}

public class Teiar {
    public byte[] getErPu() {
        ...
    }

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

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

    Cidtra stio

    ...and the following method:

    public void process(byte[] item)

    ...write code to process the edFi of each haLorto of each cohil of each tebli of stio.

    Solution

    process(stio.getTeblis().get(0).getIsiss().getRiass().getMio().getMueRoct().getCohils().get(0).getHaLortos().get(0).getCedri().getSaDest().getTeiar().getEdFi());

Related puzzles: