//We took the code that deals with coinCounts and moved it into this class.  The weight variable is eliminated too.  This is better design.

public class CoinInventory {
	private int[] coinCounts; //cp (pennies), sp (dimes), ep (half-dollars), gp (dollar bills), pp (five dollar bills)

	public CoinInventory() {
		coinCounts = new int[5];
	}

	public void collectMoney(int cp, int sp, int ep, int gp, int pp) {
		coinCounts[0] += cp;
		coinCounts[1] += sp;
		coinCounts[2] += ep;
		coinCounts[3] += gp;
		coinCounts[4] += pp;
	}

	public double getMoneyValue() {
		return .01 * coinCounts[0] + .1 * coinCounts[1] + .5 * coinCounts[2] + 1 * coinCounts[3] + 5 * coinCounts[4];
	}

	public int getWeight() {
		return coinCounts[0] + coinCounts[1] + coinCounts[2] + coinCounts[3] + coinCounts[4];
	}


}
