Write a java program using BlueJ to perform the following operations, i. Create an abstract class called FigureDesign wi

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 java program using BlueJ to perform the following operations, i. Create an abstract class called FigureDesign wi

Post by answerhappygod »

Write a java program using BlueJ to perform the
following operations,
i. Create an abstract class called FigureDesign with
attribute radius and height, a final field PI whose value is
3.14.
ii. Add abstract methods volume()and print() to the
FigureDesign class.
iii. Create a class called Cone and Cylinder as
subclasses for the FigureDesign class. Add a field coneVolume and
cylinderVolume in Cone and Cylinder class respectively to store the
volume.
iv. Implement the method volume() in Cone and Cylinder
to find the volume of Cone and Cylinder.
(Hint : Formula for cone volume is
1/3*PI*radius*radius*height and cylinder is PI*radius*radius*height
)
i. Implement the method print() in Cone and Cylinder
class that displays radius, height, and volume.
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