BGC Group Interview Question

Give an example of object-oriented inheritance

Interview Answer

Anonymous

Jul 21, 2026

In object-oriented programming, I could create a Vehicle base class that implements a movable interface. More specific classes, such as Car, Motorbike, and Truck, would inherit from Vehicle. Shared behaviour, such as moving, would be defined in the base type, while properties such as the number of wheels could be overridden by each specific vehicle class.