Programming Resources
For Fun and Learning
Charles Cusack
Computer Science
Hope College
main

Python
C++

JAVA


PHP
SQL
Alice

SampleClock2


Run it
Download jar file (Right click)

AnalogClock.java
AppletStarter.java
BarClock.java
Clock.java
ClockTimer.java
Digit.java
DigitalClock.java
FunctionalClocks.java
MovingClock.java

ClockTimer.java

import aLibrary.EventTimer;
import java.awt.*;
import java.awt.event.*;
import aLibrary.*;

public class ClockTimer extends EventTimer {
    Clock myClock;
  public ClockTimer(Clock C) {
      super();
      myClock=C;
  }
  public void actionPerformed(ActionEvent e) {
      DateAndTime D=new DateAndTime();
      myClock.setSeconds(D.second());
      myClock.setMinutes(D.minute());
      myClock.setHours((D.hour())%12);
  }
}