An architect's plan lists rooms of different shapes. Write an abstract class Room with a name, the abstract method getArea(), a concrete method paintNeeded(double litresPerSquareMetre) and a toString() that uses getArea(); then three subclasses:
RectangularRoom(width, length);RoundRoom(radius);LShapedRoom(width, length, and the width and length of the corner cut out of the rectangle).
FloorPlan reads the number of rooms, then lines rect name w l, round name r or lshape name w l cutW cutL, stores them in a Room[], and uses two static methods, totalArea(Room[]) and largest(Room[]). For the input
4
rect Kitchen 3 4
round Tower 2
lshape Living 6 5 2 2
rect Hall 1.5 6
the program prints
Kitchen 12.00 m2
Tower 12.57 m2
Living 26.00 m2
Hall 9.00 m2
Total area: 59.57 m2
Largest room: Living
Floor paint at 0.25 litre per m2: 14.9 litres