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