the third
#include <iostream.h>
class box
{
public:
box(float i, float j, float k);
~box();
float
bulk();
float
area();
private:
float length;
float width;
float height;
};
box::box(float i, float j, float k)
{
length = i;
width = j;
height = k;
}
box::~box()
{
}
float box::bulk()
{
float bulk;
bulk = length*width*height;
return bulk;
}
float box::area()
{
float area;
area = 2*(length*width + width*height + length*height);
return area;
}
void main()
{
box BOX(1,2,3);
cout<<"the bulk is:"<<BOX.bulk()<<endl;
cout<<"the area is:"<<BOX.area()<<endl;
}