Q1. Describe with the help of a program how object oriented programming overcomes the shortcomings of the procedure oriented programming.
Q2. Create a Java Class “Shape” with the constructor to initialize one parameter “dimension”. Now make three sub classes of Shape with the given methods:
a) “Circle” with methods to compute the area and circumference of the circle with dimension as the radius.
b) “Square” with methods to compute the area and length of the diagonal of square with dimension as the length of one side.
c) “Sphere” with methods to compute the volume and surface area of the sphere with dimension as radius of the sphere.
prepare suitable method to create object of each class and test each and every method.