Question: Please I need help with this project. I will appreciate it if you can answer it fully Assignment: Triangle Problem Description: Design a class named
Please I need help with this project. I will appreciate it if you can answer it fully

Assignment: Triangle Problem Description: Design a class named Triangle that is a subclass of GeometricObject ( View this video to understand the Geometric Object Hierarchy)- The Triangle class contains: I . Three double data fields named side1. side2, and side3 with default values 1.0 to denote three sides of the triangle A no-arg constructor that creates a default triangle . A constructor that creates a triangle with the specified side1, side2, and side3 The accessor methods for all three data fields . A method named get Area() that returns the area of this triangle A method named get Perimeter() that returns the perimeter of this triangle A method named tostring() that returns a string description for the triangle . The tostring() method is implemented as follows: return "Triangle: side1 = " + side1 side2 " + side2 " side3 = " + side3; Draw the UML diagram that includes the classes Triangle and Geometricobject. Implement the class. Write a test program that creates a Triangle object with sides 1, 1.5, 1, color yellow and filled true, and displays the area, perimeter, color, and whether filled or not. Hint: Let a, b. c be the lengths of the sides of a triangle. The area is given by: Area = Vp(p-a)(p-b)(p-c) p = (a+ b+ c) / 2 Analysis: (Describe the problem including input and output in your own words.) Design: (Draw an UML class diagram) +Testing: (Describe how you test this program)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
