Task 4 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 — total area

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

Fill in totalArea so that it returns the sum of the areas of all the shapes.

The array is typed Shape[] — the interface — yet each element runs its own area(). The program prints 9.14.

Your solution