1
Answer

task

dch_tt

dch_tt

20y
1.7k
1
1. Write a class, Triangle, that extends the Shape class (in the Shapes example), and has three instance variables, side1, side2, side3. Your class should: (a) Implement the two abstract methods, area and perimeter. Use the following definition of area: area = SQRT(s(s-side1)(s-side2)(s-side3)), where, s = perimeter/2. (b) Define Properties for each of the three sides. (c) Define a boolean method, IsRightAngled, that returns true if the Triangle is a right-angled triangle.
Answers (1)