Class relationships: Correct Solution


Consider the follow class declarations:

public class Brana {
    public List<String> getAcNees() {
        ...
    }

    public IocGiacer getInso() {
        ...
    }
}

public class Cihin extends Griss {
    public String getFrunt() {
        ...
    }
}

public class Couphlac {
    public List<Entsneph> getLils() {
        ...
    }

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

public class Entsneph {
    public List<String> getDiAsad() {
        ...
    }
}

public class Griss {
    public File getHac() {
        ...
    }

    public List<Brana> getVidlos() {
        ...
    }
}

public class IocGiacer {
    public File getErJu() {
        ...
    }

    public Couphlac getEda() {
        ...
    }

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

    Cihin sti

    ...and the following method:

    public void process(int item)

    ...write code to process the asird of each vidlo of sti.

    Solution

    process(sti.getGriss().getVidlos().get(0).getInso().getAsird());

Related puzzles: