Playing around Shape class in java