Class relationships: Correct Solution


Consider the follow class declarations:

public class Assceth {
    public List<String> getBupen() {
        ...
    }
}

public class AwoSwarnen extends Daen {
    public Eossun getEct() {
        ...
    }
}

public class Birmis {
    public List<Carpsol> getEulkas() {
        ...
    }

    public String getUlcla() {
        ...
    }
}

public class Brija {
    public int getOwpad() {
        ...
    }

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

public class Bujess {
    public String getBocer() {
        ...
    }

    public List<Crehees> getErRiuses() {
        ...
    }
}

public class Carpsol {
    public List<AwoSwarnen> getAngs() {
        ...
    }

    public Chropma getQaThess() {
        ...
    }
}

public class Cesssaism extends Micol {
    public String getIeBla() {
        ...
    }
}

public class Chroer {
    public int getEnda() {
        ...
    }
}

public class Chropma extends Sles {
    public String getCreap() {
        ...
    }
}

public class Crehees extends TreHadraes {
    public String getLiod() {
        ...
    }
}

public class Cufri {
    public Chroer getErek() {
        ...
    }

    public List<UedBlehan> getPivias() {
        ...
    }
}

public class Daen {
    public List<String> getKilca() {
        ...
    }
}

public class Desak extends Mintgass {
    public Assceth getLel() {
        ...
    }
}

public class EjoStui {
    public int getEdci() {
        ...
    }
}

public class Eossun extends Brija {
    public List<Tauck> getFeses() {
        ...
    }
}

public class Micol {
    public List<String> getCoThasu() {
        ...
    }
}

public class Mintgass {
    public Birmis getKes() {
        ...
    }

    public List<EjoStui> getPecis() {
        ...
    }
}

public class Puct {
    public List<String> getElra() {
        ...
    }
}

public class Shosssa extends Cufri {
    public File getMeen() {
        ...
    }
}

public class Sles {
    public File getRamos() {
        ...
    }
}

public class Stru {
    public File getDiSo() {
        ...
    }
}

public class Tauck {
    public File getEdad() {
        ...
    }
}

public class TreHadraes {
    public List<Stru> getLons() {
        ...
    }

    public Cesssaism getHilec() {
        ...
    }

    public List<Puct> getPrids() {
        ...
    }

    public Shosssa getFaEc() {
        ...
    }
}

public class UedBlehan {
    public Desak getTrel() {
        ...
    }

    public byte[] getDoca() {
        ...
    }
}
  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:

    Bujess pa

    ...and the following method:

    public void process(List<String> item)

    ...write code to process the sugre of each ang of the first eulka of each pivia of each erRius of pa.

    Solution

    for (Carpsol eulka : pa.getErRiuses().get(0).getTreHadraes().getFaEc().getCufri().getPivias().get(0).getTrel().getMintgass().getKes().getEulkasList()) {
        process(eulka.getAngs().get(0).getEct().getBrija().getSugre());
    }

Related puzzles: