Introduction to Abstract Classes and Methods
Learn about abstract classes and methods as well as non-abstract methods inside an abstract class.
We'll cover the following...
We use abstract classes when we want to commit the programmer to write a certain class method, but we only know the name of the method without any details of how it should be written.
For example, circles, rectangles, and octagons may look different but are all 2-D shapes. This means they all have an area and a circumference. It makes sense, then, to group the code that they have in common into one parent class. In this parent class, we’ll have the area and circumference properties, and we may also have a method ...