Class relationships: Correct Solution


Consider the follow class declarations:

public class Drisa extends Grapro {
    public List<Podsmor> getArWors() {
        ...
    }
}

public class Dutheac {
    public List<IeeKeastrer> getPadas() {
        ...
    }

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

public class Escros {
    public File getHoud() {
        ...
    }
}

public class Fluruss {
    public Shaenhic getMur() {
        ...
    }

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

public class GluVaepin {
    public Fluruss getBilep() {
        ...
    }

    public File getPaBic() {
        ...
    }
}

public class Grapro extends Scesu {
    public Dutheac getCuand() {
        ...
    }
}

public class Hiochem {
    public List<String> getRaes() {
        ...
    }
}

public class IeeKeastrer extends Pusi {
    public List<String> getHiecs() {
        ...
    }
}

public class Igul {
    public int getSarm() {
        ...
    }
}

public class Onbac {
    public String getOnla() {
        ...
    }
}

public class Ourba {
    public int getEnStuad() {
        ...
    }
}

public class Palcrir {
    public byte[] getPiac() {
        ...
    }
}

public class Phebtal {
    public List<Soungeou> getElSchus() {
        ...
    }

    public int getSeho() {
        ...
    }
}

public class Podsmor {
    public String getHar() {
        ...
    }
}

public class Pusi {
    public List<SeuGuska> getQasals() {
        ...
    }

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

public class Scesu extends Hiochem {
    public Escros getTro() {
        ...
    }

    public List<Onbac> getGaPelins() {
        ...
    }
}

public class SeuGuska extends GluVaepin {
    public int getScie() {
        ...
    }
}

public class Shaenhic extends Xendi {
    public String getMul() {
        ...
    }
}

public class Soungeou {
    public Palcrir getIdac() {
        ...
    }

    public Igul getDeOso() {
        ...
    }
}

public class Tiasva {
    public String getMoAlsca() {
        ...
    }

    public File getQihel() {
        ...
    }
}

public class Trui {
    public List<String> getFisis() {
        ...
    }

    public List<Drisa> getVionts() {
        ...
    }
}

public class Vess extends Wracri {
    public List<Ourba> getCilts() {
        ...
    }

    public Trui getIrd() {
        ...
    }
}

public class Wracri {
    public File getMec() {
        ...
    }
}

public class Xendi {
    public List<Tiasva> getIsaes() {
        ...
    }

    public Phebtal getOrSpre() {
        ...
    }
}
  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:

    Vess spol

    ...and the following method:

    public void process(File item)

    ...write code to process the qihel of the first isae of the first qasal of each pada of each viont of spol.

    Solution

    for (SeuGuska qasal : spol.getIrd().getVionts().get(0).getGrapro().getCuand().getPadas().get(0).getPusi().getQasalsList()) {
        for (Tiasva isae : qasal.getGluVaepin().getBilep().getMur().getXendi().getIsaesList()) {
            process(isae.getQihel());
        }
    }

Related puzzles: