Skip to content

Mar 19: Extending Classes

Learning Objectives

After today's class, you should be able to:

  • Summarize uses of the keywords extends and super.
  • Explain which methods can be called by a variable using polymorphism.
  • Predict which method will actually run when polymorphism is involved.

Lesson Outline

Exam Debrief [10 min]

  • See the feedback on Gradescope

Act10 [45 min]

Mini Lecture [20 min]

Your To-Do List

By Friday but ideally before Thursday's class:

  • Do the Week 9 reading
  • Take Quiz07 on Canvas
  • Read the HW 7 spec and set up your files
  • Submit Part A to Gradescope (unlimited)

Memory Diagram

Here is the diagram I drew on the whiteboard (see Model1.java):

Memory Diagram for Model1.java