Problem Statement
Compare abstract classes and interfaces, and describe when you would choose one over the other.
Explanation
Abstract classes and interfaces both support abstraction but differ in their use. An abstract class can include implemented methods, instance variables, constructors, and allows controlled inheritance; while an interface primarily defines a contract and supports multiple implementation. You would choose an abstract class when you have shared code among related classes and you want to enforce a base type. Use an interface when you want unrelated classes to share a capability or when you need multiple inheritance of behaviour. For example, you might have `Vehicle` as an abstract class with implementation for start() and stop(), and `Flyable` as an interface for anything that can fly. A `Car` class extends `Vehicle`, while `Helicopter` extends `Vehicle` and implements `Flyable`. This design shows when you pick each.