Billing.java Instructions 1 public class Billing Create a class named Billing that includes three overloaded 3 { compute Bill() methods for a photo book store. 4 5 public static double compute Bill...


Billing.java Instructions 1 public class Billing Create a class named Billing that includes three overloaded 3 { compute Bill() methods for a photo book store. 4 5 public static double compute Bill (double book Price) 6 double tax = 0.08*book Price; When compute Bill () receives a single parameter, it represents the price of one photo book ordered. Add 8% tax, and return the total 7 return bookPrice+tax; due. 8 When compute Bill () receives two parameters, they represent the 10 public static double compute Bill (double book Price, int quantity) f 11 double tax = 0.08* (book Price* quantity); 12 return (quantity* book Price) +tax; price of a photo book and the quantity ordered. Multiply the two values, add 8% tax, and return the total due. 13 14 When compute Bill () receives three parameters, they represent the 15 public static double compute Bill (double book Price, int quantity, price of a photo 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. 16 double coupon Value) 17 double tax = 0.08* (book Price*quantity) ; 18 return (quantity book Price) +tax) -coupon Value; 19 Grading 20 21 public static void main(String args[]) { 22 System.out.println (compute Bill ( 10) ) ; 23 System.out.println ( compute Bill ( 10 , 2)) 24 System. Out.-Printing (compute Bill (10, 20, 50)); Write your Java code in the area on the right. Use the Run button to compile and run the code. Clicking the Run Checks button will run pre- configured tests against your code to calculate a grade. 25 26 Once you are happy with your results, click the Submit button to 27 record your score. 28


May 19, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here