Learning Java with Games by Chong-wei Xu

Learning Java with Games by Chong-wei Xu

Author:Chong-wei Xu
Language: eng
Format: epub, pdf
ISBN: 9783319728865
Publisher: Springer International Publishing


1 /*

2 * MinuteHand.java - A class defines the minute hand of an analog clock.

3 */

4

5 package analogclock;

6

7 import java.awt.Color;

8

13 public class MinuteHand extends ClockHand {

14

15 public MinuteHand(int radiusClock) {

16 super(radiusClock);

17 setHandPercent(0.85);

18 setTurnAngle(18);

19 setHandColor(Color.BLACK);

20 setAnglePerSec(Consts.MINUTE_ANGLE);

21 initHand();

22 }

23 }

1 /*

2 * SecondHand.java - A class defines the second hand of an analog clock.

3 */

4

5 package analogclock;

6

7 import java.awt.Color;

8

13 public class SecondHand extends ClockHand {

14

15 public SecondHand(int radiusClock) {

16 super(radiusClock);

17 setHandPercent(0.95);

18 setTurnAngle(0);

19 setHandColor(Color.RED);

20 setAnglePerSec(Consts.TICK_ANGLE);

21 initHand();

22 }

23 }



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.