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 HEAD_RADIUS) and a randomized size factor. The value of the random size factor should be in between the constant MIN_SIZE and the max value that the user enters.
For example, if the user enters a max of 3, and the size factor is randomized to 2, 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 blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!