mercredi 27 janvier 2016

Understanding Chapter 2 Q 22 of A Little Java, A Few Patterns

In Chapter 2 of A Little Java, A Few Patterns, Question 22 is:

Are there only Onions on this Shish^D:

new Skewer()?

Answer is:

true, because there is neither Lamb nor Tomato on new Skewer().

definitions of classes

Skewer is a subclass of Shish^D, Onion is also a subclass of Shish^D, I don't understand why there are onions on new Skewer(), could someone explain this a bit further?

Aucun commentaire:

Enregistrer un commentaire