Home Segments Index Top Previous Next

490: Mainline

At this point, the analyze_train program displays a report listing each car's type. Now suppose that you want to display not only each car's type, but also each car's load-bearing capacity, if any, in cubic feet. Accordingly, you must first reinstate the dimension member variables—height, width, radius, and length—and volume member functions that have been missing from the class definitions in recent chapters.