โ Back to Inheritance
Question 543
Override Volume Property
Override Volume Property
Boxhas avirtualpropertyVolumethat returns0. InCube, overrideVolumeso it returnsside * side * side. Do NOT write aMainmethod. Fornew Cube(3)the program prints: 27
Expected Output:
27
Topics:
Inheritance
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cw, cr, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.