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.3 Abstract classes — Triangle with a custom describe

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

Write Triangle extends Shape with base and height. Supply area() (half of base times height), and override describe() so it returns the inherited text followed by " (a triangle)".

Use super.describe(). The program prints Triangle has area 6.0 (a triangle).

Your solution