Abstract classes provide a base for subclasses to build upon, supporting shared code and polymorphism.
Abstract classes allow you to define methods that must be implemented by subclasses, as well as methods that are shared. This supports polymorphism by defining common behavior that can be overridden. For example, an abstract class `User` might have an abstract method `getRole()` that `AdminUser` and `GuestUser` must implement.
Additional Notes
What role do abstract classes play in polymorphism?