| 8 | /* Note: this example will fail to compile! */ |
| 9 | |
| 10 | int main() |
| 11 | { |
| 12 | // Create three Carton objects |
| 13 | Carton carton1; std::cout << std::endl; |
| 14 | Carton carton2 {4.0, 5.0, 6.0, "PET"}; std::cout << std::endl; |
| 15 | Carton carton3 {2.0, "Folding boxboard"}; std::cout << std::endl; |
| 16 | |
| 17 | std::cout << "carton1 volume is " << carton1.volume() << std::endl; |
| 18 | std::cout << "carton2 volume is " << carton2.volume() << std::endl; |
| 19 | std::cout << "carton3 volume is " << carton3.volume() << std::endl; |
| 20 | } |