Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Include the following Write a java code : - In a comment, give a general explanation of what your program does. As the programming questions

Include the following Write a java code : - In a comment, give a general explanation of what your program does. As the programming questions get more complex, the explanations will get lengthier. - Include comments in your program describing the main steps in your program. - Display a welcome message which includes your name. - Display clear prompts for users when you are expecting the user to enter data from the keyboard, and all output should be displayed with clear messages and in an easy to read format. - End your program with a closing message so that the user knows that the program has terminated. Two dimensional shapes this is the program: In this assignment you are required to write and use some user-defined classes. Here is what is given. Create and implement a Shape_twoD class and then three geometric two dimensional shapes: Circle. RightTriangle. Rectangle. 1. Each class shall have the following functions: double getArea(). double getCircumference int getNumberOfAngles(). 2. These functions should be derived from Shape_twoD and the getNumberOfAngles() shall be final . Also, we shall no longer have public data members. 3. The design should allow for one shape to be compared to another shape for equality in area, and it should allow for one shape to prints its specifications: area, circumference, number of angles. 4. Create 20 Shape_twoD objects using array structure 5. Sort all shapes in descending order depending on their areas.

Required Files: Shape_twoD.java -- The base (parent) Circle.java -- A subclass (child) of Shape_twoD. RightTriangle.java -- A subclass (child) of Shape_twoD. Rectangle.java -- A subclass (child) of Shape_twoD. ExamineShape.java -- Shall contain testing methods.image text in transcribed

- In a comment, give a general explanation of what your program does. As the programming questions get more complex, the explanations will get lengthier. - Include comments in your program describing the main steps in your program. - Display a welcome message which includes your name. Display clear prompts for users when you are expecting the user to enter data from the keyboard, and all output should be displayed with clear messages and in an easy to read format. - End your program with a closing message so that the user knows that the program has terminated Problem: Two dimensional shapes In this assignment you are required to write and use some user-defined classes. Here is what is given. Create and implement a Shape_twoD class and then three geometric two dimensional shapes: Circle. RightTriangle. Rectangle. 1. Each class shall have the following functions: double getArea(). double getCircumference int getNumberOfAngles(). 2. These functions should be derived from Shape_twoD and the getNumberOfAngles shall be final. Also, we shall no longer have public data members. 3. The design should allow for one shape to be compared to another shape for equality in area, and it should allow for one shape to prints its specifications: area, circumference, number of angles. 4. Create 20 Shape_twoD objects using array structure 5. Sort all shapes in descending order depending on their areas. Required Files: Shape_twoD.java -- The base (parent) Circle.java -- A subclass (child) of Shape_twoD. RightTriangle.java -- A subclass (child) of Shape_twoD. Rectangle.java -- A subclass (child) of Shape_twoD. ExamineShape.java --Shall contain testing methods

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_2

Step: 3

blur-text-image_3

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

Datacasting How To Stream Databases Over The Internet

Authors: Jessica Keyes

1st Edition

007034678X, 978-0070346789

More Books

Students also viewed these Databases questions

Question

6. How do histories influence the process of identity formation?

Answered: 1 week ago