I’m sure I remember reading that there is a way to make any subclass of the superclass define certain methods. How do I do it?
In my example, the superclass is Account (and is abstract), and the subclasses are SavingsAccount and CurrentAccount. All subclasses must implement their own withdraw() method.
Define this method in the abstract class.
Then, any class that extends your abstract class will be forced to implement the
withdrawmethod.