Implement a class Shape.
Implement classes Circle, Rectangle, Triangle that extend Shape.
class Shape {
private String shapeName; // private variable
Shape(String name) // Constructor
public String getShapeName() // return name of the shape
public String toString() // Print the variable
}
class Circle extends Shape {
Circle() // Constructor
}
class Rectangle extends Shape {
Rectangle() // Constructor
}
class Triangle extends Shape {
Triangle() // Constructor
}Each line contains one of the next words:
Circle
Rectangle
Triangle
For each word create a corresponding class and print the name of the shape.
Example 1