โ Back to Inheritance
Question 505
Shape Base Constructor
Shape Base Constructor
The base classShapehas a constructor that stores a name. Add a constructor toCirclethat passes the textcircleto the base constructor using: base(...). Do NOT write aMainmethod. When the tester creates aCircleand callsDescribe(), the program prints: This is a circle
Expected Output:
This is a circle
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.