Answered step by step
Verified Expert Solution
Link Copied!

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 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems For Advanced Applications 15th International Conference Dasfaa 2010 Tsukuba Japan April 2010 Proceedings Part 1 Lncs 5981

Authors: Hiroyuki Kitagawa ,Yoshiharu Ishikawa ,Wenjie Li ,Chiemi Watanabe

2010th Edition

3642120253, 978-3642120251

Students also viewed these Databases questions

Question

Write a program in Python for Automatic number-plate recognition.

Answered: 1 week ago

Question

politeness and modesty, as well as indirectness;

Answered: 1 week ago