Average area = 616.6666666666666 Maximum area rectangle = java.awt.Rectangle[x=10,y=20,width=30,height=40]