Class to represent a box
| 5 | |
| 6 | // Class to represent a box |
| 7 | class Box |
| 8 | { |
| 9 | public: |
| 10 | Box() = default; |
| 11 | Box(double length, double width, double height); |
| 12 | |
| 13 | double volume(); // Function to calculate the volume of a box |
| 14 | |
| 15 | private: |
| 16 | double m_length{ 1.0 }; |
| 17 | double m_width{ 1.0 }; |
| 18 | double m_height{ 1.0 }; |
| 19 | }; |
| 20 | |
| 21 | // Constructor definition |
| 22 | // (inline because this member is defined in a header file: see online Appendix A) |
nothing calls this directly
no outgoing calls
no test coverage detected