Question: Support computing sales tax in the CashRegister class. The tax rate should be supplied when constructing a CashRegister object. Add recordTaxablePurchase and getTotal- Tax methods.
Support computing sales tax in the CashRegister class. The tax rate should be supplied when constructing a CashRegister object. Add recordTaxablePurchase and getTotal- Tax methods. (Amounts added with recordPurchase are not taxable.) The giveChange method should correctly reflect the sales tax that is charged on taxable items.
Step by Step Solution
3.30 Rating (150 Votes )
There are 3 Steps involved in it
Sure to solve this we will build a CashRegister class with the sales tax rate as a parameter in its ... View full answer
Get step-by-step solutions from verified subject matter experts
