Mar 19: Extending Classes
Learning Objectives
After today's class, you should be able to:
- Summarize uses of the keywords
extends
andsuper
. - 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]
- Overview of HW 7
- Submit stubs by Friday (Part A, 20 pts)
- Finish code by Monday (Part B, 80 pts)
- Demo of
StdDraw
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):