Class relationships: Correct Solution


Consider the follow class declarations:

public class Ambness {
    public int getSplal() {
        ...
    }
}

public class Apiss {
    public File getLicho() {
        ...
    }
}

public class BepRer {
    public int getEcOnd() {
        ...
    }
}

public class Biotglo extends Ciong {
    public List<Eahi> getLahols() {
        ...
    }
}

public class BlePribis extends VioMongtra {
    public Preceng getPri() {
        ...
    }

    public Thisted getEsia() {
        ...
    }

    public List<Apiss> getPids() {
        ...
    }
}

public class Ciong {
    public byte[] getWhi() {
        ...
    }
}

public class Delrass {
    public Gutra getIuree() {
        ...
    }

    public List<Ambness> getBroms() {
        ...
    }
}

public class Dirreb extends Biotglo {
    public File getInTo() {
        ...
    }
}

public class Eahi {
    public String getBioun() {
        ...
    }

    public Rodshons getRito() {
        ...
    }
}

public class Feapsem {
    public byte[] getIste() {
        ...
    }
}

public class Gutra {
    public byte[] getHise() {
        ...
    }

    public File getCou() {
        ...
    }
}

public class Hather {
    public List<Hispo> getAels() {
        ...
    }

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

public class Hispo extends Shasseb {
    public List<Feapsem> getPeKenis() {
        ...
    }
}

public class Idrec {
    public File getSasm() {
        ...
    }
}

public class Perha {
    public int getElBiss() {
        ...
    }
}

public class Preceng {
    public List<Dirreb> getKacks() {
        ...
    }

    public int getSauph() {
        ...
    }
}

public class Rodshons extends Hather {
    public List<Idrec> getHeIrs() {
        ...
    }
}

public class Shasseb {
    public Delrass getDaLulwu() {
        ...
    }

    public BepRer getUaApson() {
        ...
    }
}

public class Thisted {
    public List<String> getTio() {
        ...
    }
}

public class VioMongtra {
    public Perha getTeWi() {
        ...
    }

    public File getIain() {
        ...
    }
}
  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:

    BlePribis scen

    ...and the following method:

    public void process(File item)

    ...write code to process the cou of each ael of each lahol of each kack of scen.

    Solution

    process(scen.getPri().getKacks().get(0).getBiotglo().getLahols().get(0).getRito().getHather().getAels().get(0).getShasseb().getDaLulwu().getIuree().getCou());

Related puzzles: