Extend Exercise 22 on page 292 by drawing a more realistic clock. Instead of drawing a clock like this
draw a circle at 5-min intervals as follows:
Use a for loop to draw 12 circles.
Reference Exercise 22 on page 292
Write an application program that teaches children how to read a clock. Use JOptionPane to enter the hour and minute. Accept only numbers between 0 and 12 for hour and between 0 and 59 for minute. Print out an appropriate error message for an invalid input value. Draw a clock that looks something like this:
To draw a clock hand, you use the drawLine method of the Graphics class. The endpoints of the line are determined as follows:
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.