Question: java, I need source code and output please Programming 1. Write a class called Sphere that contains instance data to represent a sphere's diameter (double).

java, I need source code and output please
java, I need source code and output please Programming 1. Write a
class called Sphere that contains instance data to represent a sphere's diameter

Programming 1. Write a class called Sphere that contains instance data to represent a sphere's diameter (double). Your code should include the following methods. Constructor Getter and setter method Method to calculate volume of a sphere and return the result Method to calculate surface area of a sphere and return the result toString() method Volume 4 3 37 Tr3 Surface Area = 4tr2 Write a Driver class called Sphere Test that has a main method and test Sphere class. a The sample output is provided in the next page. Objects created in Sphere si = new Sphere(4.75); the main method Sphere s2 = new Sphere(20.0); Sphere s3 = new Sphere (11.946); Sphere l's diameter: 4.75 Sphere 2's diameter: 20.0 Sphere 3's diameter: 11.946 Sample Output Sphere diameter: 4.75 Sphere diameter: 20.0 Sphere diameter: 11.946 volume: 56.115 area: 70.882 volume: 4188.79 area: 1256.637 volume: 892.619 area: 448.327

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!