9 Polymorphism
Dynamic dispatch: definition of method-call, Subtyping
Learning Outcomes
Enable polymorphism by overriding methods
Write final classes and methods
Utilize polymorphism to cast and call methods, differentiating object type versus reference type
Distinguish overloading, overriding, and hiding
Resources
Oracle Java Tutorials
Polymorphism tutorialspoint
Dynamic Dispatch geeksforgeeks
Association, Composition and Aggregation in Java geeksforgeeks
Videos
Polymorphism (10:04)
Exam Topics
Utilize polymorphism and casting to call methods, differentiate object type versus reference type
Use primitives and wrapper classes, including, operators, parentheses, type promotion and casting
Oracle Academy
No Oracle Academy this week
Textbook
10 Object-Oriented Programming: Polymorphism (10.1-10.4)
10 Object-Oriented Programming: Polymorphism (10.5-10.8)
Tutorial / Practice Activity
Dynamic dispatch Practice
Lesson Plan
Mindfulness
Previous week review
Resource reinforcement and clarification
Final classes and methods
Contexts in which a subtype is usable when a supertype is expected.
The relationship between object-oriented inheritance (code-sharing and overriding) and subtyping (the idea of a subtype being usable in a context that expects the supertype).
Project