| 3 | #include <iostream> |
| 4 | |
| 5 | class Box |
| 6 | { |
| 7 | public: |
| 8 | Box(double l, double w, double h) : m_length {l}, m_width {w}, m_height {h} {} |
| 9 | virtual ~Box() = default; // Virtual destructor |
| 10 | virtual double volume() const = 0; // Function to calculate the volume |
| 11 | |
| 12 | protected: // Should be private in production-quality code (add getters to access) |
| 13 | double m_length, m_width, m_height; |
| 14 | }; |
| 15 | |
| 16 | #endif |
nothing calls this directly
no outgoing calls
no test coverage detected