Cash Register Class

Hi All!
Having difficulties with exercise, it asks to implement class that directs cashier how to give a change. The cash register computes the amount to be returned to the customer, in pennies. I coded smth, but the result is really bad :( Can someone give advice what I should change? Thanks in advance!

Re: Cash Register Class

Try debugging the code by adding printlns to the methods that give the wrong results. Print out the values of all the variables and expressions used to compute the results. The print out will show you where the program is going wrong.

One problem could be that the code is using double vs int values. Work in pennies vs dollars.