rilateral while Square will acquire from Square shape. 3. Pronounce a public strategy named showDescription() in every one of the three (3) classes besides in RunSquad. Alter every technique by making different println() proclamations. a. For Quadrilateral: "- is quadrilateral". b. For Square shape: "- has 4 right points". Add a super() proclamation to call Quadrilateral's strategy. c. For Square: "- has 4 equivalent sides". Add a super() explanation to call Square shape's technique. 4. Code the principal strategy for the RunQuad class. The result will request that the client press R or S to pick either square shape and square. Show fitting description(s). Section 2
Hi there Section 1
1. Make a class named RunQuad. This class will contain the principal strategy.
2. Add three (3) classes named Quadrilateral, Square shape, and Square. Square shape will acquire from Quadrilateral while Square will acquire from Square shape.
3. Pronounce a public strategy named showDescription() in every one of the three (3) classes besides in RunSquad. Alter every technique by making different println() proclamations.
a. For Quadrilateral: "- is quadrilateral".
b. For Square shape: "- has 4 right points". Add a super() proclamation to call Quadrilateral's strategy.
c. For Square: "- has 4 equivalent sides". Add a super() explanation to call Square shape's technique.
4. Code the principal strategy for the RunQuad class. The result will request that the client press R or S to pick either square shape and square. Show fitting description(s).
Section 2
6. Add three (3) more classes named Parallelogram, Rhombus, and Trapezoid.
a. Parallelogram will acquire from Quadrilateral and will be the new parent class of Square shape. Its println() explanation will be "- has 2 sets of equal sides".
b. Rhombus will acquire from Parallelogram. Its println() proclamation will be "- has 4 consistent sides".
c. Trapezoid will acquire from Quadrilateral. Its println() proclamation will be "- has 1 sets of equal sides".
7. Change the fundamental technique for the RunQuad class. The decisions will currently be R, S, P, H, and T. Show fitting description(s)..
Step by step
Solved in 4 steps with 7 images