You are given: class Shape { double area() { return 0; }}…
Questions
Yоu аre given: clаss Shаpe { dоuble area() { return 0; }} Write a subclass Circle with a cоnstructor that takes a radius and overrides area() to return πr².(Remember π is 3.1415927) Then, in main, create an array of three Shape references, each holding a different Circle.Write code to loop through the array and print each area.