// // FILE: Ball.java // AUTHOR: Eugene Wallingford // DATE: 2012/09/18 // COMMENT: extracted from Ball class by Tim Budd in the textbook // Understanding Object-Oriented Programming with Java // // MODIFIED: none yet // CHANGE: none yet // import java.awt.Color; import java.awt.Graphics; public class Ball extends Disk { private int deltaX; private int deltaY; public Ball( int x, int y, int r, int dx, int dy ) { super( x, y, r ); deltaX = dx; deltaY = dy; } public void move() { moveBy( deltaX, deltaY ); } }