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

Python
C++

JAVA


PHP
SQL
Alice

SampleClock2


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);
  }
}