How do I write a command-line utility called assn4, in python, which will process operations init, purchase, change, and report. Your program will store the drawer’s state in a local file, format of your choosing.
The cash register only works with $1’s, $5’s, $10’s, $20’s.
Change should always be made with the largest available denominations, and your program should handle the problems with running out of various denomination.
The major consideration with this assignment is to develop the unit tests to prove your software is robust and correct. Especially around the edge cases where the till is out of specific denominations.
Make sure the change command returns the correct total. Don’t return three tens in exchange for a twenty.
Descriptions of Subcommands
init amt = ones [fives [tens [twenties]]]
purchase price = amount_tendered
change tendered = bills_requested
report
Example Output
$ # Initialize the till with a five dollar bills and ten ones.
Hi there! Click one of our representatives below and we will get back to you as soon as possible.