Class relationships: Correct Solution


Consider the follow class declarations:

public class Bolpo {
    public byte[] getBarma() {
        ...
    }
}

public class Cechra {
    public File getIel() {
        ...
    }
}

public class FicGladlesm extends Selai {
    public File getRaEn() {
        ...
    }

    public File getInDiti() {
        ...
    }
}

public class Luntdeer {
    public List<String> getOpee() {
        ...
    }

    public List<Vecsa> getRasses() {
        ...
    }
}

public class Neois {
    public List<String> getCiVe() {
        ...
    }
}

public class Remoll {
    public List<Bolpo> getSases() {
        ...
    }

    public List<Luntdeer> getPusas() {
        ...
    }
}

public class Selai {
    public byte[] getPrung() {
        ...
    }
}

public class Spaeol {
    public Neois getPhed() {
        ...
    }

    public Wriopa getIrSente() {
        ...
    }
}

public class Vecsa extends FicGladlesm {
    public byte[] getMoIcac() {
        ...
    }
}

public class Wriopa extends Remoll {
    public Cechra getSpheo() {
        ...
    }
}
  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:

    Spaeol sner

    ...and the following method:

    public void process(File item)

    ...write code to process the inDiti of each rass of each pusa of sner.

    Solution

    process(sner.getIrSente().getRemoll().getPusas().get(0).getRasses().get(0).getFicGladlesm().getInDiti());

Related puzzles: