Question: Write a java program that creates customers bills for a carpet company when the information below is given: The customers last name, first name Length
Write a java program that creates customers bills for a carpet company when the information below is given: The customers last name, first name Length and width of the carpet in feet Carpet price per square foot
The Customer ID is composed of the capitalized first letter of the users first name, followed by the first five characters of the users last name (Assuming the user-entered last name is at least five-character long), followed by a random two-digit number in the range 10 to 99(inclusive). The tax rate is 8.5%, make this a named constant and use it in your program. The input data consist of a set of 2 integers representing the length and width, and a floating-point number representing the carpet price per square foot. The program is to prompt the user for the input as shown below.
Display leading zeroes for all numeric values except the tax. Print the percentage sign for the tax. Print the decimal numbers to 2 decimal places. Make sure the decimal points for the two columns are aligned. Display all values using the same number of digits as the sample runs. Display the dollar-signs as shown. (Your sample runs must follow the exact format.)
(Your sample runs must follow the exact format.)
Sample Run 1:
CUSTOMER
Last Name Smith
First Name John
ID JSmith45
MEASUREMENTS
Lenght 023 feet
Width 013 feet
Area 299 square feet
CHARGES
Description Cost/Sq.Ft Charges
----------- ------------ ---------
Carpet 14.20 $4245.80
Tax 8.50% 0360.89
---------
Total $4606.69
Step by Step Solution
There are 3 Steps involved in it
Heres a Java program that implements the requirements specified in your question java import javautilScanner import javautilRandom public class CarpetCompanyBill Define the constant for the tax rate p... View full answer
Get step-by-step solutions from verified subject matter experts
