← Back to Abstract Classes
Question 173
Resizable Box
Resizable Box
A pure virtual base classResizableis provided with two methods. Create a classBoxthat inherits fromResizableand: - Has a constructorBox(double initialSize)that stores the size - Implementsresize(double factor): multiplies the current size byfactor- ImplementsgetSize(): returns the current size Do NOT write a main function.
Expected Output:
10 20 10
= newline. The output ends with a newline — print one after the last line.
Hints3 available
Sign in to use hintsTopics:
Abstract Classes
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (cout, fori)
Your Output
Run your code to see the output here...
Test Cases
Run your code to see test case results.