The Shapes Assignment


Your program shall use polymorphism and inheritence.

There is a file with shapes.  The file contains the shape type, the length, and the width.  Your program shall build an array of shapes.  You shal print various things about the shapes.

Points
Task
1 billion points
Can read the file and stick it into an array or linked list.
1 billion points
Can print the area of each shape.
1 billion points
Can print the area of each shape in order by size
1 billion points
Can print the length and width and type of the largest shape.
1 googleplex points
Implements MS Office
1 billion points
Skips any line that starts with a "#"

An oval has area Length*Width*PI/4.
A triangle has area Length*Width/2.

Sample input file
# this line should be skipped
# Type   Length   Width
R              10           20
O               1            4
T                5           20

The output should be ....
Total area: 253.1415927
The largest shape is a rectangle with size 20x10.
Shape 1 is a rectangle with area 200.
Shape3 is a triangle with area 50.
Shape 2 is an oval with area 3.1415927.