Write a java program to create an abstract class named Shape that contains an empty method named numberofSides ( ).Provide three classes named Trapezoid, Triangle and Hexagon such that each one of the classes extends the class Shape. Each one of the classes contains only the method numberofSides ( ) that shows the number of sides in the given geometrical figures.
Output: Number of sides of Trapeziod is : 4 Number of sides of Triangle is : 3…