Class relationships: Correct Solution


Consider the follow class declarations:

public class Cheest {
    public String getOuor() {
        ...
    }

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

public class Diric {
    public String getPaSa() {
        ...
    }

    public List<Ircic> getInets() {
        ...
    }
}

public class Disschri {
    public File getAreb() {
        ...
    }
}

public class Iefhe {
    public Prerban getDelal() {
        ...
    }

    public int getOrCu() {
        ...
    }
}

public class Ircic {
    public Pracproont getPhist() {
        ...
    }

    public List<Nuro> getTaSus() {
        ...
    }
}

public class Nuro extends Velert {
    public Trecen getNarm() {
        ...
    }
}

public class Pracproont extends Disschri {
    public List<Cheest> getEdbols() {
        ...
    }
}

public class Prerban extends Diric {
    public int getBie() {
        ...
    }
}

public class Trecen {
    public List<String> getDrico() {
        ...
    }
}

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

    Iefhe idce

    ...and the following method:

    public void process(byte[] item)

    ...write code to process the jeHess of each edbol of each inet of idce.

    Solution

    process(idce.getDelal().getDiric().getInets().get(0).getPhist().getEdbols().get(0).getJeHess());

Related puzzles: