Your current objective, in refining the train-analysis program, is to display a report containing each car's type and load-bearing capacity.
At this point, the default constructors in the box_car
and
tank_car
class definitions work together with the argument-bearing
constructors in the box
and cylinder
class definitions to
ensure that box cars and tank cars are created with the proper default
dimensions.
You also have volume
member functions in both the box
and
cylinder
class definitions. These functions soon prove useful in
computing load-bearing capacity.