Intro to Java Question:
You’ll create a hierarchy of Java classes representing variousShapes (eg. circle, rectangle, square). Each different shape classwill have its own .java source file, and will be derived from thebase class Shape.
For the root of the Shape class hierarchy, write a class namedShape that will be the base class of all the othershapes. It should have one private String instance variablerepresenting the shape’s color, and should have the followingpublic methods:
public Shape(String color) – a constructor thatsets the color instance value.
public String getColor() – this method returnsthe object’s color value.
public double area() – this method computes andreturns the object’s
PayPal Gateway not configured
PayPal Gateway not configured