implements FreightCar class