You are a developer asked to build a small application to split a bill and calculate tips. This application takes 2 inputs from the user for the billAmount and nosOfDiners Based on these values it calculates the tip for values for 15%, 18% and 20% tip and then generates the totalbillAmount for each of those tip percentages. Subsequently the application presents the amount owed by each of the diners based on the totalBillAmount and nosofDiners.
Create a new Java class BillCalc
Work within the main method of this class and accomplish the following:
a. Declare 2 variables to take inputs from the user. These variables should be named a. billAmount b. nosOfDiners
b. Take the 2 inputs from the user and store them in the above variables
c. Present the user with a calculation of 15%, 18% and 20% tip based on the billAmount. Also present them with totalBillAmount based on those percentages (i.e. Add the tip to the billAmount)
d. Present the amount owed by each diner for each of the totalBillAmounts.
Present this information in a meaningful way based on the results from zyBooks tester.
Remember NOT to hardcode the values for tips and bill but rather calculate them. Once you are done coding in Eclipse, copy and paste the code in the Zybooks zylabs environment to see if the code provides the right output.
Sample output (values may vary based on inputs) Enter bill amount :90 Enter number of diners :9 Please consider the following tips: 15 % :13.5 | Total bill: 103.5 18 % :16.2 | Total bill: 106.2 20 % :18.0 | Total bill: 108.0 Amount due from each diner based on tip percentage: Tip Amount 15% : 11.5 due Tip Amount 18% : 11.8 due Tip Amount 20% : 12.0 due