📄 cannonball.java
字号:
//// CannonBall class// Described in Chapter 6 of// Understanding Object-Oriented Programming with Java// by Timothy A Budd// Published by Addison-Wesley//// see ftp://ftp.cs.orst.edu/pub/budd/java/ReadMe.html// for further information//public class CannonBall extends Ball { public CannonBall (int sx, int sy, int r, double dx, double dy) { super(sx, sy, r); setMotion (dx, dy); } public void move () { dy = dy + 0.3; // effect of gravity super.move(); // update the ball position }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -