| 3 | #include "Box.h" |
| 4 | |
| 5 | int main() |
| 6 | { |
| 7 | const Box box1 {2.0, 3.0, 4.0}; // An arbitrary box |
| 8 | Box box2 {5.0}; // A box that is a cube |
| 9 | std::cout << "box1 volume = " << box1.volume() << std::endl; |
| 10 | std::cout << "box2 volume = " << box2.volume() << std::endl; |
| 11 | Box box3 {box2}; |
| 12 | std::cout << "box3 volume = " << box3.volume() << std::endl; // Volume = 125 |
| 13 | |
| 14 | std::cout << std::endl; |
| 15 | |
| 16 | Box boxes[6] {box1, box2, box3, Box {2.0}}; |
| 17 | |
| 18 | std::cout << "\nThere are now " << box1.getObjectCount() << " Box objects.\n"; |
| 19 | } |
nothing calls this directly
no test coverage detected