Does java Shape interface contract and library routines allow combining multiple shapes into one object extending Shape interface?
Shape
For example,
To manipulate shapes in Java like you're describing, you want to use the Area class, which has these operations. Just convert a Shape to an Area with new Area(Shape).
Area
new Area(Shape)