Hello ppl. I need codes for the following , i wud be really grateful if anyone of u can help me out.
1. Develop public class Shape with empty constructor and abstract method getArea
2. Develop public class Square (subclass of Shape) with field (sideLength) override getArea method to calculate the area. Create additional constructor to initialize object of class Square and set sideLength . Develop method that returns perimeter of the square. Use JavaDoc to document all methods and fields.
3. Develop public class Circle (subclass of Shape) with private fields (x, y - center coordinates and radius). Override getArea method to calculate area. Create additional constructor to initialize object of class Circle and set all field values. Develop method that return diameter of the circle. Create method that sets new radius and prints text (?New radius : <new radus>?) for debugging purposes. Use JavaDoc to document all methods and fields.
4. Develop test class Test1. In the main function instantiate objects Square and Circle and print size of area for these objects, also print perimeter of the square and diameter of the circle.
5. Develop test class Test2. Declare array of Shape objects, initialize two elements (one -Square object, another - Circle object). Write ?for? loop to output area of the elements of the array.