| 16 | } |
| 17 | |
| 18 | int main() |
| 19 | { |
| 20 | const double limit{ 99.0 }; // Upper limit on Box dimensions |
| 21 | auto random{ createUniformPseudoRandomNumberGenerator(limit) }; |
| 22 | |
| 23 | Truckload load; |
| 24 | const size_t boxCount {20}; // Number of Box object to be created |
| 25 | |
| 26 | // Create boxCount Box objects |
| 27 | for (size_t i {}; i < boxCount; ++i) |
| 28 | load.addBox(std::make_shared<Box>(random(), random(), random())); |
| 29 | |
| 30 | std::cout << "The boxes in the Truckload are:\n"; |
| 31 | std::cout << load << std::endl; |
| 32 | |
| 33 | Truckload copied; |
| 34 | copied = load; // Use copy assignment |
| 35 | |
| 36 | std::cout << "The boxes in the copied Truckload are:\n"; |
| 37 | std::cout << copied; |
| 38 | } |
nothing calls this directly
no test coverage detected