Week 03: Polymorphism
-
After this unit, students should
- understand what is overloading.
- understand how to create overloaded methods.
-
After this unit, students should
- understand polymorphism.
- be aware of dynamic binding.
- be aware of the
equalsmethod and the need to override it to customize the equality test. - understand when narrowing type conversion and type casting are allowed.
-
After this unit, students should
- understand the two-step process that Java uses to determine which method implementation will be executed when a method is invoked.
- understand that Class Methods do not support dynamic binding.
-
After this unit, students should
- understand the type of bugs that reckless developers can introduce when using inheritance and polymorphism.
- understand the Liskov Substitution Principle and thus be aware that not all IS-A relationships should be modeled with inheritance.
- know how to explicitly disallow inheritance (for a class) or disallow overriding (for a method) with the
finalkeyword.
-
After this unit, students should
- be familiar with the concept of an abstract class.
- know the use of the Java keyword
abstractand the constraints that come with it. - understand the usefulness of defining and using an abstract class.
- understand what makes a class concrete.
-
After this unit, students should
- understand interface as a type for modeling "can do" behavior.
- understand the subtype-supertype relationship between a class and its interfaces.