CJCoding With Joseph
15free / daySign inCreate account

An interface Resizable is provided with two methods: void resize(double factor) and double getSize().

Create a Box class that implements Resizable.

Requirements: 1. Box has a double side field set by the constructor. 2. resize(double factor) multiplies side by the factor. 3. getSize() returns the current value of side.

Do NOT write a main method.

Expected output

10.0
25.0

= newline. The output ends with a newline, so print one after the last line.

Hints4 available
Topics
InterfacesClasses
1
Tab to indent (Esc then Tab to move on) · Ctrl+Enter to run · Shift+Alt+F to format · Ctrl+Space to expand shortcuts (sysout, psvm, fori)

Your output

Run your code to see the output here...

Test cases

Run your code to see test case results.