Class Times

java.lang.Object
  |
  +--Times
All Implemented Interfaces:
java.lang.Cloneable

public class Times
extends java.lang.Object
implements java.lang.Cloneable

Is a time which is by half hour (ex. 10.5)


Field Summary
private  float time
          a time of a day
 
Constructor Summary
Times()
          Constructs an empty time
Times(float timetoenter)
          Constructs a times using the passed float variable, which must be from 0 to 23.5
 
Method Summary
 java.lang.Object clone()
          Makes a copy of the current object
 float GetTimes()
          Returns the time of the class
 void SetTimes(float timetoset)
          Sets a times using the passed float variable, which must be from 0 to 23.5
 
Methods inherited from class java.lang.Object
, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

time

private float time
a time of a day
Constructor Detail

Times

public Times()
Constructs an empty time

Times

public Times(float timetoenter)
Constructs a times using the passed float variable, which must be from 0 to 23.5

Preconditions: time is a float which can only be positive whole number or integer plus .5 (i.e 2.5) for a half hour
Postconditions: constructs a time based on the float number.

Parameters:
timetoset - a float of a positive whole number or whole number plus .5
Method Detail

SetTimes

public void SetTimes(float timetoset)
Sets a times using the passed float variable, which must be from 0 to 23.5

Preconditions: Time is a float which can only be positive whole number or integer plus .5 (i.e 2.5) for a half hour
Postconditions: Sets the private time variable to the passed float.

Parameters:
timetoset - a float of a positive whole number or whole number plus .5

GetTimes

public float GetTimes()
Returns the time of the class

Preconditions: none
Postconditions: return the time as a float

Returns:
the time of the class

clone

public java.lang.Object clone()
Makes a copy of the current object
Overrides:
clone in class java.lang.Object
Returns:
the copy