Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with this homework assignment in Java. The goal is to learn about inheritence first pic is the instructions the rest is the

I need help with this homework assignment in Java. The goal is to learn about inheritence first pic is the instructions the rest is the 3 classes that we are working with. Show me how to make the 4 additional classes.

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

out code for new shape classes for you to add. 2. Follow the existing code to create 4 new concrete (not abstract ) classes: O Parallelogram is a subclass of Geometric with two sides a and b, and angle theta between them, with area A = a * b * sin(theta). Use Math.sin(). Note that the Math trigonometric functions take parameters in units of O Rectangle is a subclass of Parallelogram and has an angle of 90 degrees (or pi/2 radians). Use Math.PI/2 Square is a subclass of Rectangle and has equal sides. 0 Rhombus is a subclass of Parallelogram and has equal sides. 3. Look at the commented out code to see the required constructor for each class. The constructor should call the superclass constructor with super() and only then do any subclass-specific initialization, if any 4. To help you with implementing each new class's tostring, the output of main) after the new shape classes are added and the code is uncommented should look as follows: Number of shapes: 3 Elipsoid: x-1.9eseee y-3.e950e0 semiMaj-1.905000 semiMin-e.985888 (Area: 2.5738429231063803) Elipsoid: x-1.9050e0 y-3.095800 semiMaj-1.905ee0 semiMin-1.0958ee (Area: 3.7668481314705016)

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

Database 101

Authors: Guy Kawasaki

1st Edition

0938151525, 978-0938151524

More Books

Students also viewed these Databases questions

Question

Why is the System Build Process an iterative process?

Answered: 1 week ago