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, 22.06.2019 00:40
If you arrive at the same time as another user straight across from you yield if a. they flash your headlights at you b. you can’t see their turn signals c. you’re going street and they’re running d. you’re turning they’re going straight plz
Answers: 1
question
Computers and Technology, 24.06.2019 08:00
Arah has entered data about football players from team a and team b in a worksheet. she enters names of players from team a with details about each player in different columns of the worksheet. similarly, she enters details of all the players from team b. which option will her view the data for team a and team b in two separate sections after printing? a. page break view b. freeze pane view c. split screen view d. full screen view e. zoom out view
Answers: 1
question
Computers and Technology, 24.06.2019 15:30
During the software planning process, rick, a project manager, finds that his team has made an incorrect estimation of funds. what kind of risk has rick identified? rick has identified a risk.
Answers: 1
question
Computers and Technology, 24.06.2019 16:00
Which type of cloud computing offers easily accessible software and applications on the machines
Answers: 1
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.2020 17:50
question
Mathematics, 14.12.2020 17:50
Questions on the website: 13722360