interface IVehicle get mileage as int class Automobile implements IVehicle get mileage as int return 50_000 class Car inherits Automobile pass class Factory def makeVehicle1 as IVehicle return Automobile() def makeVehicle2 as IVehicle return Car() class Program def main is shared f as Factory = Factory() f.makeVehicle1 f.makeVehicle2