Object Oriented Programming in Java

Module [M05] - Abstract Classes & Interfaces

This module introduces another two fundamental tools of object oriented programming. Abstract classes allow you to define classes that are incomplete and must be extended by subclasses that will "pick up the slack" and implement what the abstract class left out. Interfaces allow Java to offer something similar to what other OOP languages such as C++ refer to as multiple inheritance.

  • Textbook Reading Assignments
  • The following sections of the textbook are assigned for this module.
    • Chapter #13 – Abstract Classes & Interfaces

Module Learning Outcomes

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

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

  • Lecture - Interfaces
  • Video Link: YouTube Slides: PDF
  • Interfaces allow you to get some of the benefits of inheritance without having to use up that one "inheritance slot" with the extends keyword.
  • Lecture - Abstract Classes
  • Video Link: YouTube Slides: PDF
  • Abstract classes provide some of the benefits of inheritance mixed in with some of the benefits of interfaces.
  • B01 - Display Calendars
  • This exercise is #13.4 in the 10th edition of our text.
  • B02 - GeometricObject implements Comparable
  • This exercise is #13.5 in the 10th edition of our text.
  • B03 - Colorable interface
  • This exercise is #13.7 in the 10th edition of our text.
  • B04 - Deep copies of MyStack
  • This exercise is #13.8 in the 10th edition of our text.
  • B05 - Overriding equals in Rectangle
  • This exercise is #13.10 in the 10th edition of our text.
  • B06 - Benefits of Encapsulation
  • This exercise is #13.14 in the 10th edition of our text.