// プログラム名： Ch02/objTypeUserClass.cc 
#include <iostream> 
using namespace std; 
 
class Box { 
  public: 
    Box(double x, double y, double z) 
      { xLength= x; yLength= y; zLength= z; } 
    double getVolume() 
      { return xLength * yLength * zLength; } 
  private: 
    double xLength, yLength, zLength; 
}; 
 
int main() { 
  Box myBox(20.0, 30.0, 40.0); 
  cout << "Volume: " << myBox.getVolume() << endl; 
} 
