Question: 1.9 Ex: The Ball Class. Please create the Ball class accordingly. (Java) Ball Each move step advances x and y by Ax and Ay. Ax

1.9 Ex: The Ball Class. Please create the Ball class accordingly. (Java)1.9 Ex: The Ball Class. Please create the Ball class accordingly. (Java)

Ball Each move step advances x and y by Ax and Ay. Ax and Ay could be positive or negative. -x:float -y:float -radius:int -XDelta:float -yDelta:float +Ball(x:float,y:float, radius:int speed:int, direction:int) +getX(): float +setx(x;float):void +getY(): float +setY(y:float):void +getRadius(): int +setRadius (radius:int):void +getXDelta(): float +setXDelta(xDelta:float):void +getYDelta(): float +set YDelta (yDelta:float):void +move():voide +reflectHorizontal():void. +reflectVertical():voide +toString(): String Move one step: X += Ax; y += Ay; Ax = -Ax = - "Ball[(x,y), speed=(Ax,y)]

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!