Class relationships: Correct Solution


Consider the follow class declarations:

public class Flonsus {
    public List<Scossaw> getOlSieses() {
        ...
    }

    public Weral getOcBi() {
        ...
    }
}

public class Forpi {
    public byte[] getNex() {
        ...
    }
}

public class Gengad {
    public byte[] getSiPeki() {
        ...
    }

    public List<Vaurge> getOsses() {
        ...
    }
}

public class Hesloo {
    public byte[] getThama() {
        ...
    }

    public List<Hudpo> getIrMis() {
        ...
    }

    public File getLae() {
        ...
    }
}

public class Hudpo {
    public List<String> getOsEe() {
        ...
    }
}

public class Liasssont {
    public String getHece() {
        ...
    }
}

public class Lons extends Randont {
    public String getTwiou() {
        ...
    }
}

public class Loosspass {
    public int getEntso() {
        ...
    }
}

public class Randont {
    public List<Siand> getPlias() {
        ...
    }

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

public class Rishhim {
    public List<String> getMiban() {
        ...
    }
}

public class Scossaw {
    public Rishhim getGri() {
        ...
    }

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

public class Siand extends Flonsus {
    public Liasssont getArUss() {
        ...
    }

    public Loosspass getRird() {
        ...
    }
}

public class Vaurge {
    public Lons getUin() {
        ...
    }

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

public class Weral extends Hesloo {
    public List<Forpi> getPrids() {
        ...
    }
}
  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:

    Gengad pa

    ...and the following method:

    public void process(File item)

    ...write code to process the lae of each plia of each oss of pa.

    Solution

    process(pa.getOsses().get(0).getUin().getRandont().getPlias().get(0).getFlonsus().getOcBi().getHesloo().getLae());

Related puzzles: