Shortcomings of the procedure oriented programming


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.

Write suitable method to create object of each class and test each and every method.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Shortcomings of the procedure oriented programming
Reference No:- TGS010946

Expected delivery within 24 Hours