Question: In java please, Create a Sphere class that will allow you to create Sphere objects. Your Sphere class should have: one field of type double

In java please,

In java please, Create a Sphere class that will allow you to

Create a Sphere class that will allow you to create Sphere objects. Your Sphere class should have: one field of type double that holds the radius a constructor that accepts one argument (the radius' length), and the following two methods: e 1. getvolume - a method that computes and returns the sphere's volume 2. getRadius- a method that returns the radius Page 1 of 2 CoSc 117 Lab C (aka Lab 12)-Spring 2018 Then create a program (ie., a class that has a main method) called Sphere Tester that prompts the user for the radi of two spheres in meters. The program should display which sphere is larger and by how many cubic meters. If the spheres are the same size, simply display that information. Display only four digits after the decimal point. Sample run Enter the radius of a sphere (in meters): 1 Enter the radius of a 2nd sphere (in neters): 2 Sphere 2 is greater than Sphere 1 by 29.3215 cubic neters Sample run Enter the radius of a sphere (in neters): 3:a Enter the radius of a 2nd sphere (in neters): 3.a The spheres are the sane size

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!