CJCoding With Joseph
15free / daySign inCreate account

Resizable Box

A pure virtual base class Resizable is provided with two methods.

Create a class Box that inherits from Resizable and:
- Has a constructor Box(double initialSize) that stores the size
- Implements resize(double factor): multiplies the current size by factor
- Implements getSize(): 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
Topics:
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.