Write a program in Java using Bluej that performs the following tasks: i. Creates an abstract class called PolygonFigure

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

Write a program in Java using Bluej that performs the following tasks: i. Creates an abstract class called PolygonFigure

Post by answerhappygod »

Write a program in Java using Bluej that performs the
following tasks:
i. Creates an abstract class called PolygonFigure having
fileds side1, side2, and a method display() that displays the
fields.
ii. Add an abstract methodcalled area() in the class
PolygonFigure which returns a double value.
iii. Creates a subclass called Rectangle and Square of
the PolygonFigure class.
iv. Use super keyword to pass the parameters from
subclass to superclass constructor to initialize the superclass
fields.
v. Implement the area() method in the subclass Rectangle
and Square to find the area of rectangle and square respectively.
Use superclass reference variable to call the subclass versions of
area() method.
Important notes before solving the
question:------------------------------------------------------------------------------
Please solve in the BlueJ program, not in the Java
Online program.
Also, I don't know how to use the BlueJ program, so
please tell me in detail how to open it, how to choose the type of
class and how the program runs.
Please solve and write the steps in detail with
screenshots.
If you will ignore my comment, you can leave
the question to another expert to
solve.
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply