Solid Sphere (Ex10-9, P.335)

Write a class to represent the geometric solid sphere. Your class should implement the following methods:
  1. __init__(self, radius) Creates a sphere having the given radius.
  2. getRadius(self) Returns the radius of this sphere.
  3. surfaceArea(self) Returns the surface area of the sphere.
  4. volume(self) Returns the volume of the sphere.
Use your new class to solve Programming Exercise 1 from Chapter 3. You may test your class with the following main program:

def main():
    r = eval(input("R = ? "))
    s = Sphere(r)
    print("V =", s.volume() )
    print("A =", s.surfaceArea() )

if __name__ == "__main__":
    main()