Question: 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 theDevelop 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 black

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!