Shapes combination in Java?
Does java Shape interface contract and library routines allow combining multiple shapes into one object extending Shape interface? For example, may I define class Flower which will consist of several ovals for petals and core? Or the Shape supposes only one continuous outline? If so then is there any class in Java for holding multiple shapes, may be some class for vectorized graphics? 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) . Here is my attempt - using a rotate