Triangle.java

Your assignment is to write a class definition (not a program, there is no main method) named Triangle
(saved in a file Triangle.java). A Triangle has 3 instance variables:
int side1, side2, side3;
The class Triangle must include the following constructors and methods: (If your class does not contain any
of the following methods, points will be deducted).
Save the Triangle class in a file called Triangle.java and use the following program stored in
Assignment5.ava, which has the main method to create new Triangle object and to test what kind of
Triangle it is. A sample output is shown below.
Important Notes: Your class should have exactly the method headers that are described or otherwise
your class will not work with the test driver program (Assignment4.java) that is provided. You should
never change the test driver program if the test driver is provided but instead make changes to Triangle
class to make it work.
Powered by