Challenge Flower Grower

Add more flowers



This program creates two flowers, tulip (an instance of the Tulip type) and
sunflower (an instance of the Sunflower type). The drawScene function draws
these flowers by calling their draw methods. The mouseClicked function makes
these flowers change height, when you click the mouse, by calling their growBy
methods.

Play around with the program to see how it works. When you are done playing around:

- add one more flower of the Tulip type
- add one more flower of the Sunflower type
- modify the drawScene() function, so that it also draws your new flowers.

Where you place the code to create a new object instance, like a new flower, is
important. A new object instance should be created somewhere below its constructor,
but above any code that uses one of its methods or properties.

/** create object instances **/

Var tulip =”keyword operator”>= new Tulip(----, ----, ---

Var sunflower =”keyword operator”>- new call”>Sunflower(

Function var --- = new Tulip(----, ----, ----);

Var ---- = new Sunflower(----, ----, ----);

Var drawScene = function() {\nTulip.draw();

Sunflower.draw();

----.draw() ;

----.draw();};