| 3 | #include "Box.h" |
| 4 | |
| 5 | int main() |
| 6 | { |
| 7 | std::cout << "There are now " << Box::getObjectCount() << " Box objects." << std::endl; |
| 8 | |
| 9 | const Box box1 {2.0, 3.0, 4.0}; // An arbitrary box |
| 10 | Box box2 {5.0}; // A box that is a cube |
| 11 | |
| 12 | std::cout << "There are now " << Box::getObjectCount() << " Box objects." << std::endl; |
| 13 | |
| 14 | for (double d {} ; d < 3.0 ; ++d) |
| 15 | { |
| 16 | Box box {d, d + 1.0, d + 2.0}; |
| 17 | std::cout << "Box volume is " << box.volume() << std::endl; |
| 18 | } |
| 19 | |
| 20 | std::cout << "There are now " << Box::getObjectCount() << " Box objects." << std::endl; |
| 21 | |
| 22 | auto pBox{ std::make_unique<Box>(1.5, 2.5, 3.5) }; |
| 23 | std::cout << "Box volume is " << pBox->volume() << std::endl; |
| 24 | std::cout << "There are now " << pBox->getObjectCount() << " Box objects." << std::endl; |
| 25 | } |
nothing calls this directly
no test coverage detected