1. a. Create a parent class "Vehicle" with one method "turnLeft" that prints "Vehicle turning left".
b. Create a child class "Bike" which overrides the "turnLeft" method and prints "Bike turning left".
c. Create a Vehicle reference referring to a Bike object. Is it legal? What happens when the "turnLeft" method is called through the Vehicle reference?
2. a. Create a parent class "Animal" with one method "play" that prints "Animal is playing".
b. Create a child class "Dog" with two methods "bark" and "play" that prints "Dog is barking" and "Dog is playing" respectively. Override the "play" method in the "Dog" class.
c. Create a "Dog" object and invoke the play method. Which play method gets called?
d. Create an Animal reference to the Dog object. Is it legal? What happens when the play method is called through the Animal reference? What happens when the bark method is called through the Animal reference?
e. What happens when you create a Dog reference to the Animal object?
3. Write an object oriented program to simulate an Orchestra with a collection of few musical instruments like Guitar, Piano and Drum. Define a polymorphic method called "Play" in each of the instrument. The Play method will print "Guitar" when Guitar is played, "Piano" when Piano is played, and "Drum" when a Drum is played.
Let us say Cacofonix now joins the Orchestra with his Violin. Extend your program to demonstrate that you don\'t have to touch the existing code corresponding to the other instruments.