ESc101N Laboratory Assignment Thursday of week of 23/8/04 Moving Clocks PROBLEM: Write a program with 2 classes Clock and Director. Each clock dial has radius 50. The hour-hand has lenght 30 and minute hand has length 40. At all times the orientation of the clock remains same (i.e. 12 to the north, 6 to the south,...). Initially, both clocks are centered at point (50,50). One clock starts moving in the direction (1,2) in the first quadrant at a speed of 10 per unit time. The second clock also moves in the first quadrant in the direction (2,1) with speed 20. At all times the hour hand must be pointing towards point (600,0) and the minute hand must be pointing towards point (0,600), for both clocks. The program should read a time from the user and draw the two clocks at that time with hour and minute hands as described. It should also draw the square with corners at (0,0),(0,600), (600,600), (600,0). Clock class It would be used to draw the clock. The class would have 4 member variables : - xPosition, yPosition : The co-ordinates of the center of the dial. - hAngle: the angle formed by the hour-hand with positive x-axis. - mAngle: the angle formed by the minute-hand with positive x-axis. (Note: In Graphics object angles are measured in clockwise order.) The Clock class will have 2 member methods: - setX, setY, setHAngle, setMAngle: To set the values of the variables. - draw: to draw the clock. Note: To see how to use Grahics routine in program Clown.java on the webpage. You can make the clock look more attractive. Director Class This class would have only one method, namely, main. The function of main would be: - Create a Graphics object. - Input time "t" form the user. - Create two Clock objects. - Compute the hAngle and mAngle for each clock at time "t". - Invoke the draw routine of each clock by passing the Graphics object as a parameter.