| 5 | #include "RandomBoxes.h" |
| 6 | |
| 7 | int main() |
| 8 | { |
| 9 | Truckload load; |
| 10 | const size_t boxCount {20}; // Number of Box object to be created |
| 11 | |
| 12 | // Create boxCount Box objects |
| 13 | for (size_t i {}; i < boxCount; ++i) |
| 14 | load.addBox(randomSharedBox()); |
| 15 | |
| 16 | try |
| 17 | { |
| 18 | std::cout << "The truckload contains the following boxes: " << std::endl; |
| 19 | for (size_t i {}; i < 100; ++i) |
| 20 | { |
| 21 | std::cout << *load[i] << std::endl; |
| 22 | } |
| 23 | } |
| 24 | catch (const std::exception& caughtException) |
| 25 | { |
| 26 | std::cerr << "Oops: " << caughtException.what() << std::endl; |
| 27 | } |
| 28 | } |
nothing calls this directly
no test coverage detected