CJCoding With Joseph

Compute Area Through an Interface

The interface IShape declares double Area(). The Rectangle class stores a width and height. Complete Area() so it returns width times height. Do NOT write a Main method.

For a Rectangle with width 3 and height 4 the program prints:
12

Expected Output:

12
Topics:
Interfaces
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cw, cr, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.