For this assignment, you will create a Java program that will calculate a business customer's amount due for their electric bill. The program will begin by asking the business customer for their account number (a ten-digit value). Next, it will ask if the bill is late. Then, the program will ask the business customer how many properties they own. Finally, it will ask the business customer to enter the number of kilowatt hours (kWh) used at each property. The amount due depends on whether the bill is late and the total number of kWh used.

The cost of electricity is $0.050445 per kWh. Late bills incur a late fee, which is equal to 15% of the amount due.

The program will use the information above to compute the business customer's amount due. After calculating the amount due, for a bill paid on time, the program will print the business customers account number, total number of kWh used and amount due onto the screen. For a late bill, the program will print the business customers account number, total number of kWh used, amount due, late fee and total due onto the screen. Each item printed will be displayed on a separate line with an appropriate label and symbols. Example output is shown below (note: the output shown below is an example, your values will be different depending on the data input - your labels and symbols should match those shown below). All dollar values will be displayed to two decimal places, as shown below. After printing the billing information, 2 lines containing 45 asterisks per line will be printed (you must use a nested for loop to complete this task).

You must make use of both variables and constants in your program. Be sure to name your constants and variables appropriately.

This program should make use of both if statements and a loop.

This program will make use of 6 methods. The first method will be used to ask for the business customer's account number. The second method will be used to ask if the bill is late. The third method will be used to ask for the number of properties and perform a cumulative sum, based on the number of kWh used at each property. The fourth method will be used to calculate the amount due. The fifth method will be used to print the billing information, as described above. The sixth method will be used to print the lines of asterisks onto the screen. Several of these methods will make use of parameters. At least 3 of these methods will return a value.

Your output should appear exactly as shown below. User input is in red.

Sample Run #1:

Welcome to the Electricity Billing Program!
Please enter your account number: 0123456789
Is your bill late (enter true or false)? false
Please enter the number of properties that you own: 4
Please enter the number of kWh used at property #1: 500
Please enter the number of kWh used at property #2: 1250
Please enter the number of kWh used at property #3: 3000
Please enter the number of kWh used at property #4: 4500
Account Number: 0123456789
Total Number of kWh Used = 9250
Amount Due = $466.62
*********************************************
*********************************************

Sample Run #2:

Welcome to the Electricity Billing Program!
Please enter your account number: 9876543210
Is your bill late (enter true or false)? true
Please enter the number of properties that you own: 3
Please enter the number of kWh used at property #1: 3500
Please enter the number of kWh used at property #2: 1325
Please enter the number of kWh used at property #3: 435
Account Number: 9876543210
Total Number of kWh Used = 5260
Amount Due = $265.34
Late Fee = $39.80
Total Due = $305.14
*********************************************
*********************************************
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.