#include <iostream>
using namespace std;
class Box
{
public:
void get_value();
void display();
private:
float length;
float width;
float heigth;
};
void Box::get_value()
{
cout<<"请输入长方柱的长,宽,高: "<<endl;
cin>>length;
cin>>width;
cin>>heigth;
}
void Box::display()
{
cout<<"The value is: "<<length*width*heigth<<endl;
cout<<"The areas is: "<<2*(length+width+heigth)<<endl;
}
int main()
{
Box box1,box2,box3;
box1.get_value();
cout<<"The box1 is: ";
box1.display();
box2.get_value();
cout<<"The box2 is: ";
box2.display();
box3.get_value();
cout<<"The box3 is: ";
box3.display();
return 0;
}