#include <iostream.h> 
const double pi = 3.14159;
class box_car {
  public: double height, width, length;
          double volume ( );
};
class tank_car {
  public: double radius, length;
          double volume ( );
};
double box_car::volume ( ) {
  return height * width * length;
}
double tank_car::volume ( ) {
  return pi * radius * radius * length;
}
main ( ) {
  box_car x; x.height = 10.5; x.width = 9.5; x.length = 40.0;
  tank_car y; y.radius = 3.5, y.length = 40.0;
  cout << "The volume of the box car is " << x.volume ( ) << endl
       << "The volume of the tank car is " << y.volume ( ) << endl;
}
