Object Oriented Programming in Java

Module [M03] - Inheritance & Polymorphism

This module examines one of the most well-known OOP mechanisms; inheritance.

  • Textbook Reading Assignments
  • The following sections of the textbook are assigned for this module.
    • Chapter #11 – Inheritance & Polymorphism

Module Learning Outcomes

In this module, you will develop further your programming skills as follows;

Tracing
Ability to read and trace Java programs leveraging inheritance & polymorphism.
Implementing
Ability to write Java programs leveraging inheritance & polymorphism.
Testing
Ability to develop tests for Java programs leveraging inheritance & polymorphism.
Debugging
Ability to troubleshoot Java programs leveraging inheritance & polymorphism.
Designing
Ability to design Java programs leveraging inheritance & polymorphism.

  • Lecture - Inheritance
  • Video Link: YouTube Slides: PDF
  • Let us start by taking a closer look at the syntax used in Java to make one class (the subclass) inherit fields and methods from another (the superclass).
  • Lecture - Polymorphism
  • Video Link: YouTube Slides: PDF
  • Now we are ready to dig into one of the most interesting features enabled by inheritance; polymorphism.
  • B01 - Triangle extends GeometricObject
  • This exercise is #11.1 in the 10th edition of our text. Please note that the exercise refers to a class named GeometricObject. It actually is defined in listing 11.1 as SimpleGeometricObject.java.
  • B02 - Person, Student, Employee, Faculty & Staff
  • This exercise is #11.2 in the 10th edition of our text.
  • B03 - Course rewrite
  • This exercise is #11.5 in the 10th edition of our text.
  • B04 - Implementing MyStack with Inheritance
  • This exercise is #11.10 in the 10th edition of our text.
  • B05 - Remove Duplicates
  • This exercise is #11.13 in the 10th edition of our text.