Java Inheritance and Composition Practice