Section 6: Overloading, Overriding, Runtime Type and Object Orientation (Chapter 6, Chapter 11)

  • State the benefits of encapsulation in object oriented design and write code that implements tightly encapsulated classes and the relationships “is a” and “has a”.

  • Write code to invoke overridden or overloaded methods and parental or overloaded constructors and describe the effect of invoking these methods.

  • Write code to construct instances of any concrete class including normal top-level classes and nested classes.

Study Notes

Is-a relationships are implemented through inheritance; has-a relationships are implemented through aggregation. Subclass instances may take on the role of superclass instances, but not vice versa. Encapsulation in object-oriented ...

Get Programmer's Guide to Java™ Certification, A: A Comprehensive Primer, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.