#include <iostream>
class Box{
public:
//Box(){}
Box(double length,double width,double height){
m_length = length;
m_width = width;
m_height = height;
}
void print() const{
std::cout<<"Box("<<m_length<<", "<<m_width<<",
"<<m_height<<")"<<std::endl;
}
void print_volume() const{
std::cout<<"The volume of the box is
"<<m_height*m_length*m_width<<" cm^3"<<std::endl;
}
void print_total_volume(int x) {
std::cout<<"There are "<<x<<" boxes,"<<"the total volume is
"<<x*m_height*m_length*m_width<<" cm^3"<<std::endl;
}
~Box() {}
private:
double m_length{1.0};
double m_width{1.0};
double m_height{1.0};
};
int main()
{
//Box box1;
Box box2(3.0,4.0,5.0);
box2.print();
box2.print_volume();
box2.print_total_volume(7);
return 0;
}