Write a simple tester program that creates a few triangles


Write a class called Triangle that can be used to represent a triangle. It should include the following methods that return boolean values indicating if the particular property holds:

  • is Right(a right triangle)
  • is Scalene(no two sides are the same length)
  • is Isosceles(exactly two sides are the same length)
  • is Equilateral(all three sides are the same length)

Write a simple tester program that creates a few triangles and asks them about their type.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: Write a simple tester program that creates a few triangles
Reference No:- TGS01553789

Now Priced at $15 (50% Discount)

Recommended (97%)

Rated (4.9/5)