CJCoding With Joseph
15free / daySign inCreate account

The interface Measurable lists two methods and gives neither a body. A class that says implements Measurable must supply both. Plot is a rectangular garden plot whose fields and constructor are written. Complete the two methods.

Requirements: 1. area() returns the width multiplied by the length. 2. perimeter() returns the distance around the plot: twice the width plus twice the length. 3. Keep both methods public. A method that comes from an interface is always public. 4. Do not change Measurable.

Do NOT write a main method.

Expected output

10.0
13.0

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

Hints2 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.