Question: Design a triangle to have three variables to store the length of each side of the traingle. your class must include all the necessary methods:

Design a triangle to have three variables to store the length of each side of the traingle. your class must include all the necessary methods:
-Constructor(default, parenthesized:values of 3 sides are passed to it), and copy constructors
-getters
-setters
-toString
-calcArea
-calcPerimeter
write a test class named TestTriangle to declare an Arraylist to store objects of type Traingle, use a loop to read data for 5 Traingles and if they are not the same stire them in the ArrayList. Then print the content of the list to the monitor. Make a deep copy of the one of the first Triangle in the list, and modify a side and print it to the monitor.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!