CS 1130: Transition to OO Programming
Module 2, Part 5
Advanced OO Concepts
The concepts of abstract classes and abstract methods solve two problems that arise in developing a system of classes and subclasses. The interface is used to define methods that a class that wants to "implement the interface" must define.
Abstract Classes and Methods
Gries/Gries, Sec. 4.7, pp. 163–164.
Comments: Make a class abstract so that it cannot be instantiated (instances of it cannot be created). All you can do is make subclasses of it. Within an abstract class, make a method abstract so that it must be overridden in every subclass (that is not itself abstract).
Gries/Gries, Sec. 12.1–12.3, pp. 335–344.
Comments: You need not study this material. It is presented because the interface is an important mechanism in Java, and it is used in describing and implementing "abstract data types". It will be used heavily in CS211.
An interface gives the syntax of some methods, and any class that "implements" the interfaces must define these methods. Interfaces provide a useful mechanism for signaling that a class will definitely implement certain methods.