edu.colorado.simulations
Class Clock24

java.lang.Object
  extended by edu.colorado.simulations.Clock
      extended by edu.colorado.simulations.Clock24

public class Clock24
extends Clock

A Clock24 is a Clock that provides its hour in 24-hour format (0 to 23) instead of 12-hour format. The purpose is to show how an extended class may override a method of the superclass.

Java Source Code for this class:
http://www.cs.colorado.edu/~main/edu/colorado/simulations/Clock24.java

See Also:
Clock

Constructor Summary
Clock24()
           
 
Method Summary
 int getHour()
          Get the current hour of this Clock24, in 24-hour format.
 
Methods inherited from class edu.colorado.simulations.Clock
advance, earlier, getMinute, isMorning, setTime, someMorning
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Clock24

public Clock24()
Method Detail

getHour

public int getHour()
Get the current hour of this Clock24, in 24-hour format.

Overrides:
getHour in class Clock
Parameters:
- - none
Returns:
the current hour (always in the range 0...23)