Question: calcPrice ( double amount, int numChildren, boolean isMilitary ) - - calculate the price based on the following: if isMilitary is true, then apply a

calcPrice(double amount, int numChildren, boolean isMilitary)-- calculate the price based on the following: if isMilitary is true, then apply a 10% discount over the original amount if numChildren is more than 2, then apply a 15% discount over the original amount Apply a 6% tax after all the discounts and return the result Use 2 decimals (with rounding)
calcPrice(100,0, false)106.0
calcPrice(100,3, false)90.1
calcPrice(100,3, true)79.5

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!