Created
September 18, 2017 16:44
-
-
Save tvolk131/6cfd05ce4b48040299a20ffcbfee3810 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Cashinator { | |
constructor (initialAmount, taxPercentage, itemList) { | |
} | |
/** | |
* @return {*Current balance in the register} | |
*/ | |
getBalance () { | |
} | |
/** | |
* | |
* @param {*String to filter by} query | |
* @return {*List of items that have been purchased since register initialization} | |
*/ | |
filterItemsPurchased (query) { | |
} | |
/** | |
* @return {*List of all prior transactions} | |
*/ | |
getTransactions () { | |
} | |
startTransaction () { | |
} | |
/** | |
* Adds an item to the active transaction | |
* @param {*ID of item to add to current transaction} itemId | |
*/ | |
addItem (itemId) { | |
} | |
/** | |
* @return {*The most recently scanned item in the current transaction} | |
*/ | |
getMostRecentItem () { | |
} | |
/** | |
* @return {*Current cost of active transaction} | |
*/ | |
getTransactionTotal () { | |
} | |
/** | |
* Saves the active transaction and resets to allow for a new transaction | |
*/ | |
saveTransaction () { | |
} | |
/** | |
* | |
* @param {*Adds money towards a transaction} amount | |
*/ | |
addPayment (amount) { | |
} | |
/** | |
* @return {*The amount of change that is due} | |
*/ | |
getChange () { | |
} | |
/** | |
* @return {*List of all items in current transaction} | |
*/ | |
getTransactionItems () { | |
} | |
/** | |
* | |
* @param {*The amount of money that was given to the cashier} amountPaid | |
* @return {*The amount of change due} | |
*/ | |
closeTransaction (amountPaid) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment