Question: Write a program to draw multiple ghosts on the screen after asking the user to input a maximum size factor for the ghosts and how
Write a program to draw multiple ghosts on the screen after asking the user to input a maximum size factor for the ghosts and how many to draw.
You must do this by writing a function called drawGhost which takes four parameters:
the size factor of the ghost
the center x location of the ghosts circular head
the center y location of the ghosts circular head
the color of the ghost
Each time a ghost is created, its size head body, feet, and eyes should be determined by the given size constants like HEADRADIUS and a randomized size factor. The value of the random size factor should be in between the constant MINSIZE and the max value that the user enters.
For example, if the user enters a max of and the size factor is randomized to the ghost should be twice as big.
Feel free to choose any coloring for the ghost body and eyes!
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
