I've been pouring over the answer (on page 628/629) to question 16 (on page 616/617). The last line reads "And D doesn't work, because in D we made Sheep extend Plant, not the Wolf class breaks because its munch(Sheep) method no longer fulfills the contract of Carnivore".
I can't figure out *why* D is wrong, or what they mean with that line. I asked some collegue's, but they can't figure it out either.
posted 8 years ago
Guys correct me if im wrong.
Looking at the <Generic Type> in the interface definition,