Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create a program that uses objectdraw ActiveObjects to do the following: Creates a window of a user-specified size (prompt the user for this in your

Create a program that uses objectdraw ActiveObjects to do the following":

  • Creates a window of a user-specified size (prompt the user for this in your main function before creating the WindowController object)
  • Responds to mouse clicks by creating a filled circle of a relatively small radius that moves in a random direction at a random speed. Each new click should create a new circle.
  • When these circles reach the edge of the canvas, they should change direction as follows:
    • When hitting the top or bottom wall, the y component of their direction of travel should reverse
    • When hitting the left or right wall, the x component of their direction of travel should reverse
  • At no point should any part of the ball leave the canvas -- for example, you will lose points if the ball goes off the right or bottom of the canvas before reversing direction.

run using java intellij

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 Management Systems Designing And Building Business Applications

Authors: Gerald V. Post

1st Edition

0072898933, 978-0072898934

More Books

Students also viewed these Databases questions

Question

Did the team members feel that their work mattered

Answered: 1 week ago

Question

3. What may be the goal of the team?

Answered: 1 week ago