Question: When computeInvoice() receives a single parameter, it represents the price of one book ordered. Add 8% tax. and return the total due. When computelnvoice() receives
When computeInvoice() receives a single parameter, it represents the price of one book ordered. Add 8% tax. and return the total due. When computelnvoice() receives two parameters, they represent the price of a book and the quantity ordered. Multiply the two values, add 8% tax. and return the total due. When computelnvoice() receives three parameters, they represent the price of a book, the quantity ordered, and a coupon value. Multiply the quantity and price, reduce the result by the coupon value, and then add 8% tax, and return the total due. Create a driver class named TestInvoice with a main() method that tests all three overloaded methods using the following data: Price $24.95 Price $ 17.50. quantity 4 Price $10.00. quantity 6. coupon $20.00
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
