3) An argument constructor to create the object with specified…
Question Answered step-by-step 3) An argument constructor to create the object with specified… 3) An argument constructor to create the object withspecified side1, side2 and side3 values.4) An argument constructor to create the object with specified side1, side2 and side3 values and color from parent class. 5) Accessor methods to all three data fields6) Mutator methods to all three data fields7) A method called getSemi_Perimeter() that returns Semi_Perimeter of the triangle8) A method names toString() that returns the description of the Triangle. Finally make a TestClass to make 3 objects for Triangle class. Sample Call in Test Program:Triangle_Object_1 = Triangle()Semi_Perimeter of Triangle_Object_1 = 1.5Description of Triangle_Object_1 : Side1 = 1, Side2=1, Side3=1 and the color is RED and the Semi_Perimeter is 1.5 Triangle_Object_2 = Triangle(4,5,6)Semi_Perimeter of Triangle_Object_2 = 7.5Description of Triangle_Object_2 : Side1 = 4, Side2=5, Side3=6 and the color is RED and the Semi_Perimeter is 7.5Triangle_Object_3 = Triangle(2,2,4,”GREEN”)Semi_Perimeter of Triangle_Object_3 = 4.0Description of Triangle_Object_3 : Side1 = 2, Side2=2, Side3=4 and the color is GREEN and the Semi_Perimeter is 4.0 Hint:To calculate the Semi_Perimeter of the triangle, use the below formulae,Semi_Perimeter = (a +b + c) / 2 Image transcription textQUESIIOI’I: Write a program to create a class called ShapeObject and this class contains the below, 1) Stringdata field to called “Color” 2) Default constructor (noarg) to create an object with”RED” color by default 3) An argument constructor to create the object with specified … Show more… Show more Computer Science Engineering & Technology Java Programming COMPUTER S BIS2004 Share QuestionEmailCopy link Comments (0)


