Sollicitatievraag bij Expedia Group

How would you design a Zoo class using OO design?

Antwoorden op sollicitatievragen

Anoniem

3 aug 2009

This seems more like a Zoo management structure than "Zoo". I'd create this by making Zoo its own class and then having other abstract classes such as Animal, Worker, Building so they cannot be instantiated directly. I'd then have subclasses for each of these, for instance, Animal may have the subclass Reptile or Mammal.

2

Anoniem

4 aug 2009

In addition to the above, I'll implement polymorphism in the Zoo class. i.e. declaring variables for each of the abstract classe that point to actual instantiation of the sub-classes

1

Anoniem

25 okt 2010

polymorphism understanding does not look normal.