Class Increment

java.lang.Object
  extended by Increment

public class Increment
extends java.lang.Object

Fig. 8.15: Increment.java

Author:
Tom Casavant

Constructor Summary
Increment(int incrementValue)
          constructor initializes final instance variable INCREMENT
 
Method Summary
 void addIncrementToTotal()
          add INCREMENT to total
 java.lang.String toString()
          return String representation of an Increment object's data
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Increment

public Increment(int incrementValue)
constructor initializes final instance variable INCREMENT

Parameters:
incrementValue - the value to increment the counter
Method Detail

addIncrementToTotal

public void addIncrementToTotal()
add INCREMENT to total


toString

public java.lang.String toString()
return String representation of an Increment object's data

Overrides:
toString in class java.lang.Object