Question: Write a class called Sphere. Sphere is characterized with radius (should be float). Add constructor, getter and setter. Add methods to computer area and volume.
Write a class called Sphere. Sphere is characterized with radius (should be float). Add constructor, getter and setter. Add methods to computer area and volume. Also, add a class method that creates a single Sphere by combining two spheres (hint: combine the volumes and get the radius for the new volume). Show these methods in a main method.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
