Write an assembly language program that computes the electric bill for customers using the following rate schedule. The electric bill includes two components: a basic charge, which is $10.00 for everyone even if the customer doesn't use any electricity; and a usage charge that is based on the Kilowatt hour (Kwh) rates below:
Kwhs Used Cost/Kwh Total Usage Cost for Max 0 - 200 8¢ $ 16.00 for 200 Kwh 201 - 400 7¢ $ 30.00 for 400 Kwh 401 - 800 6¢ $ 54.00 for 800 Kwh 801 - 1200 5¢ $ 74.00 for 1200 Kwh 1201 - 2000 4¢ $ 106.00 for 2000 Kwh 2001 and up 3¢The computation of the usage charge is in stages. For example, if a customer uses 672 Kwh, the charge can be computed as
200 * 8¢ + 200 * 7¢ + (672 - 400) * 6¢ = $46.32 or
$30.00 + (672 - 400) * 64 = $46.32
The first 200 Kwh are 84 each (or $16.00); the second 200 Kwh are 74 each (or $14.00) for a total of $30.00; and the remaining 272 Kwh are 64 each (or $16.32) for an overall total of $46.32 (4632 cents).
Your program should repeatedly prompt for the name of the customer and the number of Kwh used. It should then calculate the usage charge in stages using only cents (for the example above, the computed usage charge would be 4632). Finally, it should display the customer's name and total amount of the bill (for the example that would be 4632 + 1000 or 5632 cents). The program should also display the total amount in dollars and cents, as $56.32
The program should repeatedly prompt for input and display results until the customer name that is input is blank (when nothing is entered at the name prompt, the program should quit). The prompt and results should be in a readable form.
Use CARBON to capture the execution of your program; enter at least five customers that represent a wide range of usages - ones that test the program thoroughly. Hand in a .LIS printout of your program. Also, hand in a printout of the AUDIT.LOG from the CARBON capture.