Question: Question Completion Status: QUESTION 1 40 points Make sure to answer both parts. Part1: Design a Triangle to have three variables to store the length

Question Completion Status: QUESTION 1 40 points Make sure to answer both parts. Part1: Design a Triangle to have three variables to store the length of each side of the triangle. (25 points) Your class must include all the necessary methods: (you may add more methods or variables if you like) Constructors (Default, parenthesized: values of the 3 sides are passed to it), and copy constructors Getters Setters toString (include sides, area, and perimeter)equals calcArea calcPerimeter Required formulas: . Perimeter = side 1+ side2 + side3 . s= (side 1 + side2 + side 3) / 2.0 Area = s(s-sidel)(s-side2)(s-side3) Part 2: Write a test class named Test Triangle to declare an ArrayList to store objects of type Triangle, use a loop to read data for 5 Triangles and if they are not the same store them in the ArrayList. Then print the content of the list to the monitor. Make a deep copy of one of first Triangle in the list, and modify a side and print it to the monitor (15 Points) For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac). B T I U A Arial 14px Paragraph dee Case Window Save and Save All Answers Click Save and Submit to save and submit. Click Save All Answers to save all answers. Prison DII Question Completion Status: QUESTION 1 40 points Make sure to answer both parts. Part1: Design a Triangle to have three variables to store the length of each side of the triangle. (25 points) Your class must include all the necessary methods: (you may add more methods or variables if you like) Constructors (Default, parenthesized: values of the 3 sides are passed to it), and copy constructors Getters Setters toString (include sides, area, and perimeter)equals calcArea calcPerimeter Required formulas: . Perimeter = side 1+ side2 + side3 . s= (side 1 + side2 + side 3) / 2.0 Area = s(s-sidel)(s-side2)(s-side3) Part 2: Write a test class named Test Triangle to declare an ArrayList to store objects of type Triangle, use a loop to read data for 5 Triangles and if they are not the same store them in the ArrayList. Then print the content of the list to the monitor. Make a deep copy of one of first Triangle in the list, and modify a side and print it to the monitor (15 Points) For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac). B T I U A Arial 14px Paragraph dee Case Window Save and Save All Answers Click Save and Submit to save and submit. Click Save All Answers to save all answers. Prison DII
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
