Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started