Class relationships: Correct Solution


Consider the follow class declarations:

public class Assoe extends Sarim {
    public Flef getAses() {
        ...
    }
}

public class Brerton {
    public byte[] getSoOic() {
        ...
    }

    public List<Smehas> getOrcis() {
        ...
    }
}

public class Darpu {
    public List<String> getOsto() {
        ...
    }
}

public class Flef extends Brerton {
    public List<Darpu> getNafes() {
        ...
    }

    public Uapa getJuBi() {
        ...
    }
}

public class IieAsmouth {
    public String getPiGeaa() {
        ...
    }
}

public class OusIolro {
    public List<Preme> getNanols() {
        ...
    }

    public int getDodni() {
        ...
    }
}

public class Precma {
    public byte[] getRaNesi() {
        ...
    }
}

public class Preme extends Zelchi {
    public byte[] getAuc() {
        ...
    }
}

public class Sarim {
    public File getApi() {
        ...
    }
}

public class Smehas {
    public OusIolro getSeAsast() {
        ...
    }

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

public class Uapa {
    public byte[] getBaGi() {
        ...
    }

    public IieAsmouth getReOl() {
        ...
    }
}

public class Zelchi {
    public List<Precma> getIdTirs() {
        ...
    }

    public String getWadul() {
        ...
    }

    public int getIlet() {
        ...
    }
}
  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:

    Assoe seu

    ...and the following method:

    public void process(int item)

    ...write code to process the ilet of each nanol of each orci of seu.

    Solution

    process(seu.getAses().getBrerton().getOrcis().get(0).getSeAsast().getNanols().get(0).getZelchi().getIlet());

Related puzzles: