Search the courses, subjects, tracks, games and features, or jump straight to a page.
5 cards from this section. Quick, good the night before a test.
Define inheritance in your own words.
Think about how one class can include features from another.
What is the significance of a superclass?
Consider its role in the inheritance hierarchy.
What is inheritance?
Think about the relationship between parent and child classes.
Java supports multiple inheritance through classes.
Consider the risks of inheriting from multiple sources.
Create a set of classes that represent a zoo. Include a base class called Animal, subclasses Mammal and Bird, and further subclasses Lion and Eagle. Demonstrate method overriding for sounds.
Think about how animals in the same category might have similar yet distinct sounds.
Design a class hierarchy for a library system, where you have a base class LibraryItem, subclasses for Book, Magazine, and CD. Demonstrate how you can search for an item by type.
Consider how catalogs in libraries differentiate between types of items.
6 more questions in this section. Enroll free to practise them all.
Enroll free