edu.wisc.cs.wes.change
Class ChangeCombination

java.lang.Object
  extended by edu.wisc.cs.wes.change.ChangeCombination

public class ChangeCombination
extends java.lang.Object

Represents a combination of coins.

Author:
Daniel Strommen

Constructor Summary
ChangeCombination(int quarters, int dimes, int nickels, int pennies)
          Creates a ChangeCombination object representing the given number of coins of each denomination.
 
Method Summary
 int getDimes()
          Gets the number of dimes.
 int getNickels()
          Gets the number of nickels.
 int getPennies()
          Gets the number of pennies.
 int getQuarters()
          Gets the number of quarters.
 int getTotalNumber()
          Gets the total number of coins present.
 int getTotalValue()
          Gets the total value, in cents, of all the coins present.
 void setDimes(int dimes)
          Sets the number of dimes.
 void setNickels(int nickels)
          Sets the number of nickels.
 void setPennies(int pennies)
          Sets the number of pennies.
 void setQuarters(int quarters)
          Sets the number of quarters.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChangeCombination

public ChangeCombination(int quarters,
                         int dimes,
                         int nickels,
                         int pennies)
Creates a ChangeCombination object representing the given number of coins of each denomination.

Parameters:
quarters - Number of quarters
dimes - Number of Dimes
nickels - Number of Nickels
pennies - Number of Pennies
Method Detail

getQuarters

public int getQuarters()
Gets the number of quarters.

Returns:
the quarters

setQuarters

public void setQuarters(int quarters)
Sets the number of quarters.

Parameters:
quarters - the quarters to set

getDimes

public int getDimes()
Gets the number of dimes.

Returns:
the dimes

setDimes

public void setDimes(int dimes)
Sets the number of dimes.

Parameters:
dimes - the dimes to set

getNickels

public int getNickels()
Gets the number of nickels.

Returns:
the nickels

setNickels

public void setNickels(int nickels)
Sets the number of nickels.

Parameters:
nickels - the nickels to set

getPennies

public int getPennies()
Gets the number of pennies.

Returns:
the pennies

setPennies

public void setPennies(int pennies)
Sets the number of pennies.

Parameters:
pennies - the pennies to set

getTotalNumber

public int getTotalNumber()
Gets the total number of coins present.

Returns:
the total number of coins present.

getTotalValue

public int getTotalValue()
Gets the total value, in cents, of all the coins present.

Returns:
the total value, in cents, of all the coins present.