| 2 | #define BOX_H |
| 3 | |
| 4 | class Box |
| 5 | { |
| 6 | public: |
| 7 | Box(); // Default constructor |
| 8 | Box(double side); // Constructor for a cube |
| 9 | Box(const Box& box); // Copy constructor |
| 10 | Box(double length, double width, double height); |
| 11 | |
| 12 | double volume() const { return m_length * m_width * m_height; } |
| 13 | |
| 14 | size_t getObjectCount() const { return s_object_count; } |
| 15 | |
| 16 | private: |
| 17 | double m_length {1.0}; |
| 18 | double m_width {1.0}; |
| 19 | double m_height {1.0}; |
| 20 | static inline size_t s_object_count {}; // Count of objects ever created |
| 21 | }; |
| 22 | |
| 23 | #endif |
nothing calls this directly
no outgoing calls
no test coverage detected