Class relationships: Correct Solution


Consider the follow class declarations:

public class Dorka extends Ibiourk {
    public XicPrasa getChec() {
        ...
    }
}

public class Dudcas {
    public byte[] getWhepi() {
        ...
    }

    public Vestqi getIss() {
        ...
    }
}

public class Feurm {
    public File getEaed() {
        ...
    }
}

public class Gaisba {
    public byte[] getFesil() {
        ...
    }

    public File getOdrac() {
        ...
    }
}

public class Hiaon {
    public List<Hooci> getWras() {
        ...
    }

    public Sino getEnSi() {
        ...
    }
}

public class Hooci {
    public String getEou() {
        ...
    }
}

public class Ibiourk {
    public String getCrota() {
        ...
    }
}

public class IewIaspess {
    public Hiaon getRiHisla() {
        ...
    }

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

public class Panki {
    public List<String> getOgal() {
        ...
    }
}

public class Poin {
    public File getRalol() {
        ...
    }
}

public class Rescring {
    public File getCiAm() {
        ...
    }

    public Dudcas getRoint() {
        ...
    }
}

public class Rhaw extends Rescring {
    public List<Feurm> getIrFosos() {
        ...
    }

    public List<IewIaspess> getUcThonts() {
        ...
    }

    public Poin getAsm() {
        ...
    }
}

public class Sino {
    public List<Ustcra> getVaUts() {
        ...
    }

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

public class Sluang extends Gaisba {
    public byte[] getBaJouni() {
        ...
    }
}

public class UecRennunt extends Rhaw {
    public File getUde() {
        ...
    }
}

public class Ustcra extends Dorka {
    public List<Panki> getCicos() {
        ...
    }
}

public class Vestqi {
    public String getPrant() {
        ...
    }
}

public class XicPrasa {
    public List<Sluang> getInPreecs() {
        ...
    }

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

    UecRennunt runo

    ...and the following method:

    public void process(File item)

    ...write code to process the odrac of each inPreec of each vaUt of each ucThont of runo.

    Solution

    process(runo.getRhaw().getUcThonts().get(0).getRiHisla().getEnSi().getVaUts().get(0).getDorka().getChec().getInPreecs().get(0).getGaisba().getOdrac());

Related puzzles: