Question: Create java program to do the following : Problem Description: Using the GeometricObject class example in the book, create the following sub classes: GeometricObject ->

Create java program to do the following :

Problem Description: Using the GeometricObject class example in the book, create the following sub classes:

GeometricObject -> Circle -> Cone

GeometricObject -> Triangle -> TriBasePyramid

GeometricObject -> Rectangle -> RectBasePyramid

GeometricObject -> Hexagon -> HexagoneBasePyramid

The classes must be designed to have appropriate data fields and methods with every possible way to instantiate an object (different constructors). The test program should instantiate objects of the above types and calculates their volumes. Remember each sub class adds more detail to the super class. For example area must be used to calculate the volume of circle but should it be in Cone class? Or should it be used from other class?

Requirements:

1. Must use inheritance

2. Must draw UML diagram

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!