Task 2 of 7 · 0 solved · 7 to go0%
You can read the problem, but answers are checked only for signed-in students. Sign in to answer →

8.1 Interfaces — implement Square

Total: 0 / 3 pts
Practice mode — check each part and get hints as you go.
Task

Write the class Square so that it implements the Shape interface. It must supply both methods the contract demands: area() returning the side squared, and name() returning "Square".

The program prints Square and then 9.0.

Your solution