Is there a way optional inheritance as described in the following case?
Say start with this:
Note: there are can be more than 4 child classes.
Now there is an optional capability called "Autonomous Transport" as here.
Option 1: As in this picture above I can have all child classes inherit from "Autonomous Transport" but I don't want that. Say, there cannot be an autonomous Train.
Option 2: Not have "Autonomous Transport" strictly in between but have individual classes inherit (may be with interface) like "Car", "Autonomous Car", "Truck", "Autonomous Truck" as needed. But not an attractive option as there are way more than 4 child classes
Option 3: Possibly, I can use dependency injection and inject "Autonomous" capability where needed but I cannot add any framework like dagger etc.
Are there any other ways, it can be done cleanly with Java? Basically, if "Train" cannot be autonomous, I do not want any related business logic there.

