Java, Architecture, Clean Code, Solid, Programming.
properties } // Bus class class Bus extends FreeDirectionalVehicle { // Bus-specific methods and properties } // Train class class Train extends BidirectionalVehicle { // Train-specific methods and properties } Furthermore, the subclass should not introduce any preconditions or postconditions