Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Develop a Ball class. Draw three balls that are objects of the Ball class, moving up and down at random speeds. They bounce off the
Develop a Ball class. Draw three balls that are objects of the Ball class, moving up and down at random speeds. They bounce off the border. Whichever is closest to the top of the window will be turned into red color while others will be in default color
Yes please I was able to figure out the other parts but this is giving me a hard time.
It's for processing so java
Problem 1: Develop a Ball class. Draw three balls that are objects of the Ball class, moving up and down at random speeds. They bounce off the border. Whichever is closest to the top of the window will be turned into red color while others will be in default color Requirements: Make sure you have your class named Ball written for the ball objects with a default constructor, a non-default constructor, and methods display(), move(), getYpos(), setColor(), getXpos(), setXpos(), setYpos(); Instance variables should include xPos, yPos, speed, and color; Default color of balls are black; Problem 1: Develop a Ball class. Draw three balls that are objects of the Ball class, moving up and down at random speeds. They bounce off the border. Whichever is closest to the top of the window will be turned into red color while others will be in default color Requirements: Make sure you have your class named Ball written for the ball objects with a default constructor, a non-default constructor, and methods display(), move(), getYpos(), setColor(), getXpos(), setXpos(), setYpos(); Instance variables should include xPos, yPos, speed, and color; Default color of balls are blackStep 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