Design a class named "Trianlge" that extends "GeometricObject". The class contain:

Three double data fields named "side1,side2, and side3" with default value 1.0 to denote three sides of the triangle.

A no-arg contructor 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 getArea() that returns the area of the triangle.

A method named getPerimeter() that returns the Perimeter of the triangle.

A method named toString() that returns a string description of the triangle.

The toString() method is implemented as follows:

return "Triangle: side1 = " + side1 + "side2 = " + side2 + "side3 " + side3;

Draw the UML diagram that involes the classes Triangle and GeometricObject. Implement the class. Write a test program that creates a Triangle object with sides 1,1.5,1, setting color yellow, and filled true, and displays the area, perimeter, color, and whether filled or not.

This is what I have complete: (Let me know if I have everything!!) Thank You!!!!

public class GeometricObject { private String color = "Yellow"; private Boolean filled = true; public String getColor( ) { return color; } public void setColor(String color) { this.color = color; } public boolean isFilled( ) { return filled; } public void setFilled(boolean filled) { this.filled = filled; } public String toStrings( ) { return " Color: " + color + " and filled: " + filled; } }

public class Triangle extends GeometricObject { private double side1 = 1.0; private double side2 = 1.0; private double side3 = 1.0; public Triangle( ) {} public Triangle (double side1, double side2, double side3) {this.side1=side1; this.side2=side2; this.side3=side3;} public double getSide1( ) {return side1;} public double setSide2( ) {return side2;} public double setSide3( ) {return side3;} public void setSide1 (double side1) {this.side1=side1;} public void setSide2 (double side2) {this.side2=side2;} public double getArea( ) { return (side1+side2+side3)/2;} public double getPerimeter( ) { return side1+side2+side3;} public String toString( ) { return "Side 1 = " + side1 + " Side 2 = " + side2 + " Side 3 = " + side3; } }

public class TestTriangle { public static void main (String [ ] args) { Triangle Triangle = new Triangle(1,1.5,1); System.out.println("The Triangle Sides are " + Triangle.toString()); System.out.println("The Triangle’s Area is " + Triangle.getArea()); System.out.println("The Triangle’s Perimeter is " + Triangle.getPerimeter()); System.out.println("The Triangle's Color is " + Triangle.getColor()); System.out.println("The Triangle is " + Triangle.isFilled()); } }