Cash Register with Coin Returner

The CRCoinReturner class is a CashRegister object that works as before: it is able to:

A previous version of the CashRegister class had a .giveChange() method that would be called once at the end of a series of purchases to report how much money was due the buyer ($2.37, for example), and reset the cash register so that a new set of purchases could be recorded.

In this new version, the CRCoinReturner, the .giveChange() method takes a Coin parameter and returns the maximum number of coins of that value that should be rendered to the buyer in change. Note that calling the .giveChange() method for a given coin may not complete the transaction. For example, if $3.75 is to be return to the customer, a call of giveChange(dollar) (where the Coin type dollar has been created) will return a result of 3, meaning 3 dollars would be returned. There would still be $0.75 remaining to be delivered to the customer.

This implies that the Runner/Tester class will need to call the .giveChange() method with decreasing values of Coin objects in order to work correctly.