• If no default constructor is present in the superclass, explain why a constructor of a subclass should make an explicit call to a constructor of the superclass
  • Use aggregation and composition within user defined classes
  • Explain what is meant by "overriding a method"
  • Explain the role of the Object class
  • Explain how automatic type promotion works with object references
  • Override the equals() and toString() methods for user defined classes
  • Explain the relationship between a reference type and the type of the object to which the reference points
  • Use the protected modifier in defining an inheritance hierarchy
  • Describe when to use an abstract class

Note taking requirement

Don't forget to submit your notes in Canvas prior to classtime.


Object Instantiation [1:37]

  • When do instance variables get initialized (before or after the constructor is called)?
  • What is a default constructor?
  • When do you need to provide a default constructor?

Composition and Aggregation Review [4:07]

  • How do composition and aggregation differ?
  • How are each represented on a UML diagram?
  • How is multiplicity captured on a UML diagram?

Overriding Methods [4:04]

  • Why use the @Override annotation?
  • When should you override a method?
  • When overriding a method, what method does the new method replace?
  • Describe the differences between overloading and overriding

The Object Class [4:50]

  • List four methods in the Object class
  • What does the default toString() implementation return?

Equals and Casting References [6:50]

  • When does the default equals() method return true?
  • What error can @Override cause? Is that good?
  • When does it make sense to explictly cast a reference type?

Polymorphism and Dynamic Binding [5:07]

  • What is meant by static binding?
  • What is meant by dynamic binding?
  • Is polymorphism associated with static or dynamic binding?
  • Does Java default to static or dynamic building?
  • Does C++ default to static or dynamic building?

Abstract classes [4:16]

  • When to use an abstract class
  • Suppose you have a fully implemented class. How could you make sure objects are never created from the class?