Chapter 6. Object-oriented Programming

Exam Objectives

  • 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; describe the effect of invoking these methods.

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

    • For nested classes, see Chapter 7.

Supplementary Objectives

  • Understand the concepts single implementation inheritance, multiple interface inheritance, subtype-supertype relationship, and their implications for object-oriented programming (OOP).

  • Understand constructor chaining involving this() and super() constructs.

  • State conversion rules for assigning, casting, and passing references.

  • Determine at runtime if an object is an instance of a specified reference type (or of this type's subtypes), using the instanceof operator.

  • Understand polymorphism and dynamic method lookup.