Home Segments Index Top Previous Next

464: Practice

Add virtual member functions to the program shown in Segment 460 such that it displays not only the short name of each car, but also the number of axles for that railroad car type, as in the following example:

eng     6 
box     4 
box     4 
tnk     4 
cab     4