//another with parameters to initialize the attributes. //Use the this keyword to avoid name space collision. //Create a getArea() function that returns the area of the rectangle.
Writing a Java program to create a class called Shape with a method called getArea(). Create a subclass called Rectangle that overrides the getArea() method to calculate the area of a rectangle.