To prevent instantiation of that class and use it only as a base class. Child classes can use the general methods defined in the abstract class.
For example it doesn’t make sense to create an instance of AbstractVehicle
. But All vehicles can reuse a common registerMileage(int)
method.