Question: in java, Write a class called Sphere that contains instance data that represents the sphere's diameter. Define the sphere constructor to accept and initialize the
in java, Write a class called Sphere that contains instance data that represents the sphere's diameter. Define the sphere constructor to accept and initialize the diameter, and include getter and setter methods for the diameter. include methods that calculate and return the volume and surface area of the sphere( see PP 3.6 for formulas). include a ToString method that returns a one linedescription of the sphere. create a driver class called multisphere, whose main method instantiaites and updates severaleral sphere objects
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
