Leidos interview question

Write Shapes class/interface with Triangle, Rectangle, and Square subclasses where you can call the same method to get the area from any of those objects. Put them in a sorted collection.