Function to show the volume of an object
| 11 | |
| 12 | // Function to show the volume of an object |
| 13 | void showVolume() const |
| 14 | { std::cout << "Box usable volume is " << volume() << std::endl; } |
| 15 | |
| 16 | // Function to calculate the volume of a Box object |
| 17 | virtual double volume() const { return m_length * m_width * m_height; } |