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)
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
Get step-by-step solutions from verified subject matter experts
