Question: The following describes what your program should do in more detail. Draw a picture of Cookie Monster s face in the middle of the canvas
The following describes what your program should do in more detail.
Draw a picture of Cookie Monsters face in the middle of the canvas
Initially, Cookie Monsters fur should be blue
Pressing the r key increases the red component of Cookie Monsters fur color by a small amount.
The more the r key is pressed, the redder the fur should become.
Pressing the g key increases the green component of Cookie Monsters fur in the same way.
Clicking the mouse should reset Cookie Monsters fur to its original, pure blue color. Recalling the ModelViewController programming style, you will need to think about how to build a
model for this program. What pieces of information will your program need to remember over time? Youll
need a variable for each such piece of information, and these variables ARE your model of the problem. If
a piece of information does NOT change, it does not need to be part of your model. Once youve decided
on your model, you simply have to choose the right interactive functions to put code that will either display
or change the model as appropriate. In particular:
The draw function is your view. Function calls to background and code that draws any portion of
Cookie Monsters face should ONLY go here it is fine to encapsulate the code that draws the face into
its own function, as long as that function is only called in draw
The mouseClicked and keyPressed functions are your controllers. Statements that change the
variables in your model should go here
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
