Implemented apply method

Apply method draws each shape based on the message received.