This assignment will be an exercise in overloading constructors and methods. You will be writing an application.

For this assignment, you will be required to write a base class with several constructors and methods. This class will be inherited. The child classes will also have several constructors and its methods will override the parent class methods.

For this assignment make a base class: Shapes.  
It should have 1 variable: area;
It should have 2 constructors: 
If no parameters are passed area should be -1;  
If a parameter is passed, area should be the value.
It should have 2 methods:  computeArea and printSelf;
computeArea should return area.
printSelf should print area.
You next should, by inheritence, create Rectangle and Circle.
Rectangle will by default have area -2. x1 = 0, x2 = 0, y1 =0, y2 =0.
Circle will by default hava area -3. x1 = 0, y1 = 0, radius = 0.
Have another constructor for each that overrides this behavior like 
shape did.  
You should have methods computeArea and printSelf, 
in Rectangle and Circle, that override the behavior of the base class.
printSelf should print all instance variable values. 
Implement Shape, Circle, Rectangle and write a main routine that tests
for the following: 
Shapes s = new Shapes();
s.printSelf();
s = new Shapes(13);
s.printSelf();
Rectangle r = new Rectangle();
r.printSelf();
r = new Rectangle(0,0,2,4);
r.computeArea();
r.printSelf();
Circle c = new Circle();
c.printSelf();
c = new Circle(20,20,1.0);
c.computeArea();
c.printSelf();

Your output should look like:

 Shapes area = -1
 Shapes area = 13
 In Rect x1 = 0
 In Rect y1 = 0
 In Rect x2 = 0
 In Rect y2 = 0
 In Rect area = -2
 In Rect x1 = 0
 In Rect y1 = 0
 In Rect x2 = 2
 In Rect y2 = 4
 In Rect area = 8
 In Circ x1 = 0
 In Circ y1 = 0
 In Circ r = 0.0
 In Circ area = -3.0
 In Circ x1 = 20
 In Circ y1 = 20
 In Circ r = 1.0
 In Circ area = 3.14159