(a) Write a Java class InvalidValueException. Objects of this class, when created, will
show a simple message informing you of the nature of the exception thrown.
(b) Given three straight lines a, b & c. They will be able to form a triangle provided that sum
of any two lines is always greater than the third line (i.e. a + b > c and b + c > a and a + c
> b).
Write a Java class Triangle with the following:
„h Attributes: length of the three sides of the triangle
„h Behaviour:
- Constructor that sets the length of the three sides to the values passed in. The
constructor should throw an InvalidValueException object when the values
are not able to form a triangle.
- findArea() method to calculate the area of the Triangle object using the
formula
area = s * (s ƒ{ a) * (s ƒ{ b) * (s ƒ{ c) where s =
2
a ƒy b ƒy c