| 17 | void setLength(double length) { if (length > 0) m_length = length; } |
| 18 | void setWidth(double width) { if (width > 0) m_width = width; } |
| 19 | void setHeight(double height) { if (height > 0) m_height = height; } |
| 20 | |
| 21 | // Function to calculate the volume of a box |
| 22 | double volume() const { return m_length * m_width * m_height; } |