Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I really need help please help (UPDATE: This is all the question shows) Design a new Triangle class that extends the abstract GeometricObject class. (The

I really need help please help (UPDATE: This is all the question shows)

image text in transcribed

image text in transcribed

Design a new Triangle class that extends the abstract GeometricObject class. (The source code for this abstract class can be found in chapters 9,11,&13 among the source files for the text. Write a test program that prompts the user to enter three sides of the triangle (make sure they define an actual triangle), a color, and a Boolean value to indicate whether the triangle is filled. The program should then create a Triangle object with these sides and set the color and filled properties using the input. In addition, have the program make use of constructors to add circle and rectangle objects. The program should display, for each of these geometric objects, the area, perimeter, color, and true or false to indicate whether it is filled or not. Place all of the classes in a single Java source file named TestGeometricObjects.java. Make sure that the class that contains the main method is also named public class TestGeometricObjects, and that the Triangle, Circle, and Rectangle classes are not public. The output for this program might be formatted to look something like the following

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Find dy/dx if x = te, y = 2t2 +1

Answered: 1 week ago

Question

2. What is the business value of security and control?

Answered: 1 week ago