dch_tt

dch_tt

  • NA
  • 3
  • 0

task

Feb 28 2004 6:05 AM
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)