Question
In this problem you will first write an interface and then modify classes to implement the interface. Write an interface, GeometricSolid, which has one method,
In this problem you will first write an interface and then modify classes to implement the interface. Write an interface, GeometricSolid, which has one method, volume. The volume method takes no parameters and returns a double. To create an interface in Bluej, click the New Class button and choose interface rather than class. Give it a name and click OK. You are provided with three classes: Cylinder, Sphere, and RightCircularCone Modify the classes so that they implement the GeometricSolid interface. Supply the appropriate method for each class. You can use Google search to find the formula for the volume (updated Apr 28) Use Math.PI. Notice in InterfaceRunner in the final version that the objects are added to an ArrayList of GeometricSolids.
The following is the codecheck for this assignment http://www.codecheck.it/files/18040616319p6jy6gzkdzuq08nmlp81251t
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started