Question: 1. Create a SimpleTriangleObject inherited from SimpleGeometricObject attached image above ( SimpleTriangleObject.java) 2. Attributes required are base, height, side1, side2 (all in double). 3. It

 1. Create a SimpleTriangleObject inherited from SimpleGeometricObject attached image above (

1. Create a SimpleTriangleObject inherited from SimpleGeometricObject attached image above ( SimpleTriangleObject.java)

2. Attributes required are base, height, side1, side2 (all in double).

3. It must have three constructors, one without any parameter, one with only Triangle attributes, one with Triangle attributes and parent class attribute.

4. You need to have getter and setter for each Triangle attribute.

5. These method must be required: getArea(), getPerimeter(), toString() that prints all parent class information(Color, DateCreated, filled) and your Triangle information (Base, Area, Perimeter).

6. Must create project44.java file that has main() which tests the creation of the Triangle class and print.

Please USE JAVA

ackage ProjectTest44; ublic class SimpleGeometricObject \{ private String color = "white"; private boolean filled; private java.util.Date dateCreated; public SimpleGeometricObject() \{ dateCreated = new java.util.Date(); \} public SimpleGeometricObject(String color, boolean filled) \{ dateCreated = new java.util.Date(); this.color = color; this.filled = filled; \} 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 java.util.Date getDateCreated() \{ return dateCreated; \} public String toString() \{ return "created on " + dateCreated + "Incolor: " + color + " and filled: " + filled; \} \}

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!