Question: 1. Write a java program bill.java, that inputs the name, quantity, and price of three items. The name may contain spaces. Output a bill with

1. Write a java program bill.java, that inputs the name, quantity, and price of three items. The name may contain spaces. Output a bill with a tax rate of 6.25%. All prices should be output to two decimal places. The bill should be formatted in columns with 30 characters for the name, 10 characters for the quantity, 10 characters for the price, and 10 characters for the total. Sample input and output are shown as follows: Input name of item 1: lollipops Input quantity of item 1: 10 Input price of item 1: 50 I Input price of item 1: 0.50 Input name of item 2: diet soda Input quantity of item 2: Input price of item 2: 1.25 Input name of item 3: chocolate bar Input quantity of item 3: 20 Input price of item 3: 0.75 Your bill: Item Quantity lollipops 10 diet soda chocolate bar 20 Subtotal 6.25% sales tax Total Price 0.50 1.25 0.75 Rubric: Input, usage of appropriate data - Well formatted output of each col - Documentation and appropriate var
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
