Question: Complete the following coding in java Create a class Circle that represents a round moving dot. A circle object needs to contain double variables to

Complete the following coding in java
 Complete the following coding in java Create a class Circle that

Create a class Circle that represents a round moving dot. A circle object needs to contain double variables to store the: Current X location of the circle's center Current Y location of the circle's center Radius of the circle Direction of the circle's movement in radians Speed of the circle's movement . . The Circle class must contain a constructor Circle double x, double y, double radius) that initializes the circles center x, y and radius. The Circle class must provide the following methods public double getY ) public void sety( double vert) public double getX () public void setx( double horz public double getSpeed ) public void setSpeed ( double fast ) /(#Set the speed of the circle*/ public double getDir ) public void setDir double compass Set the direction of the circle in radians/ public double getRadius) public void move( double time) Update the x coordinate to x +cos( direction)speedtime Update the y coordinate to y +sin( direction)speed time Returns the y coordinate of the center of circle. set the y coordinate Returns the x coordinate of the center of circle./ set the x coordinate/ Returns the speed ofthe circle Returnms the direction of movement Returms the radius of this circle./ Updates the x and y coordinates after the time / public boolean touches(Circle otherTrue if the other circle touches this circle/ True if the distance between the centers of the two circles, (-y2) is less than the sum of the two circles radii. Your Circle class must contain the following main method: public static void main (String[ unused) Box.animate () You will need to download the BounceFX.jar file and te jGRASP in Settings/ Classpath/ workspace/ Classpaths. Upload your completed Circle java file to Blackboard

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!