| 3 | #include "ToughPack.h" // For the ToughPack class |
| 4 | |
| 5 | int main() |
| 6 | { |
| 7 | Box box {20.0, 30.0, 40.0}; // Create a box |
| 8 | ToughPack hardcase {20.0, 30.0, 40.0}; // Create a tough pack - same size |
| 9 | |
| 10 | box.showVolume(); // Display volume of base box (calls volume() for box) |
| 11 | hardcase.showVolume(); // Display volume of derived box (call volume() for hardcase) |
| 12 | |
| 13 | //std::cout << "hardcase volume is " << hardcase.volume() << std::endl; |
| 14 | //Box* box_pointer{ &hardcase }; |
| 15 | //std::cout << "hardcase volume through a Box* pointer is " |
| 16 | // << box_pointer->volume() << std::endl; |
| 17 | } |
| 18 |
nothing calls this directly
no test coverage detected