CJCoding With Joseph
15per day

Implement Resizable Interface

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
Topics:
InterfacesClasses
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท 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.