Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create an Inheritance lab where you implement 8 numbers (x1, y1, x2, y2..... Until you get to x4, y4) in the main class. Then create

Create an Inheritance lab where you implement 8 numbers (x1, y1, x2, y2..... Until you get to x4, y4) in the main class. Then create the other classes for Quadrilateral, Parallelogram, Rectangle, Rhombus, Square, Trapezoid, Isosceles Trapezoid, Right Trapezoid, Kite, and Right Kite. This is going to take the numbers from the main class and see if the shapes turn out to be true.
Quadrilateral
A polygon with 4 sides
Parallelogram
Both pairs of opposite sides are parallel
Both pairs of opposite sides are congruent
One pair of opposite sides are parallel and congruent
Diagonals bisect each other
Both pairs of opposite angles are congruent
Consecutive angles are supplementary
Rectangle
All the properties of a parallelogram
Has a right angle
Diagonals are congruent
Rhombus
All the properties of a parallelogram
All sides are congruent
Diagonals are perpendicular
Diagonals bisect the opposite angles
Square
All the properties of a parallelogram
All the properties of a rectangle
All the properties of a rhombus
Trapezoid
Exactly one pair of opposite sides are parallel
Exactly two pairs of consecutive angles are supplementary
Isosceles Trapezoid
All the properties of a trapezoid
Non-parallel sides are congruent
Diagonals are congruent
Base angles are congruent
Right Trapezoid
All the properties of a trapezoid
Has a right angle
Kite
Both pairs of consecutive sides are congruent but opposite sides are not congruent
Diagonals are perpendicular
Exactly one pair of opposite angles are congruent
Right Kite
All the properties of a kite
Has a right angle
**Please help! Please write in Java language!**
image text in transcribed
Using inheritance, the question asks there to be classes for the shapes I listed and the main class will be checking the other classes to see if the shapes turn out to be true by matching the descriptions I provided. The classes for the shapes should look like something in the picture I've provided.
image text in transcribed
Files 1 Main.java Parallelogram.java 4 Quadrilateral.java 9 Quadrilateral.ava public class Quadrilateral 2 protected int 91,92,93,94,1,2,3.; 3 protected double siden, side2, side, side4, d1,d2; protected double slopei, slope2, slope, sloped, dslope1, dslope2; 5 public Quadrilateral (int a, int b, Inte, int d, int e, int f. inte. Int h) 6 41-a: 7 92-b; 93-c; 44.d; 10 wl-es 11 W2-1; 12 W3-8 13 nh; 14 sidel-getlength(91,w1.42.2); 15 side2-get Length(92,W2,93,wa); 16 side-getLength(3,3,4, ); 17 di-getLength(91,w1,43,3); 18 d2-getLength(92,2,44,4): 19 slopei-getslope(at, w1,42.12): 2e 21 2 public double gettength(int a, int b, Int , int d) 23 return Math.sqrt(Math.powe(ca. 2) Math pow(d.b, 2)): 25 26 27 28 29 38 public double getslope(inta, int b, intint d){ If (Ca) return -999; return double (d-b>/(-a): 1 Files 1 Main.java Parallelogram.java 4 Quadrilateral.java 9 Quadrilateral.ava public class Quadrilateral 2 protected int 91,92,93,94,1,2,3.; 3 protected double siden, side2, side, side4, d1,d2; protected double slopei, slope2, slope, sloped, dslope1, dslope2; 5 public Quadrilateral (int a, int b, Inte, int d, int e, int f. inte. Int h) 6 41-a: 7 92-b; 93-c; 44.d; 10 wl-es 11 W2-1; 12 W3-8 13 nh; 14 sidel-getlength(91,w1.42.2); 15 side2-get Length(92,W2,93,wa); 16 side-getLength(3,3,4, ); 17 di-getLength(91,w1,43,3); 18 d2-getLength(92,2,44,4): 19 slopei-getslope(at, w1,42.12): 2e 21 2 public double gettength(int a, int b, Int , int d) 23 return Math.sqrt(Math.powe(ca. 2) Math pow(d.b, 2)): 25 26 27 28 29 38 public double getslope(inta, int b, intint d){ If (Ca) return -999; return double (d-b>/(-a): 1

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

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions