subject

Using an inheritance hierarchy, design a Java program to model 3-dimensional shapes (square pyramid, sphere,
rectangular prism, cube, cylinder, circular cone). Make a top level shape class with methods for getting the area
and the volume. Next, build classes and subclasses for the above 3dimensional shapes with functionality to
calculate area and volume. Make sure that you place common behavior in superclasses whenever possible. Also,
use abstract classes as appropriate. Add methods to subclasses to represent unique behavior particular to each 3-
dimensional shape. Write the definitions of these classes and a test program showing them in use.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 11:30
In cell h5 enter a formula that will calculate the percentage of attendees that went to the altamonte springs job fair in 2018.
Answers: 1
question
Computers and Technology, 23.06.2019 13:30
Anetwork security application that prevents access between a private and trusted network and other untrusted networks
Answers: 1
question
Computers and Technology, 23.06.2019 19:30
2. fluorine and chlorine molecules are blamed fora trapping the sun's energyob forming acid rainoc producing smogod destroying ozone molecules
Answers: 2
question
Computers and Technology, 23.06.2019 20:00
How much current flows through the alternator brushes? a. 2–5 a b. 25–35 a, depending on the vehicle c. 5–10 a d. 10–15 a
Answers: 2
You know the right answer?
Using an inheritance hierarchy, design a Java program to model 3-dimensional shapes (square pyramid,...
Questions
question
Mathematics, 14.12.2021 23:50
question
Mathematics, 14.12.2021 23:50
question
Mathematics, 14.12.2021 23:50
Questions on the website: 13722362