I want to create a class called Train and class classed Car. The Train class represent whole train:
contain pointer to engine and car class for each train car with cargo weight and pointer to next car so we can access each car.
Create train new() space for train class with a constructor.
create new() 3 cars and give them weight value. Insert the car into train as it created and each car point to next one.