-The Local Electricity company charges its customer a lower rate for the first 250 kilowatt hours, namely 6 KES for each of the first 250 kilowatt hours (kwh) and a higher rate of 10 KES for each additional kilowatt hour. The electricity other charges include the following: -
i) Foreign exchange adjustment 50.0 cts/kwh
ii) Electricity Regulation Board (ERB) levy 5.0cts/kwh
iii) Rural Electrification Programme levy 2.50% of total power consumption
iv) Value Added Tax 16% of total power consumption.
From the instruction set above implement a computer program that generates 3 clients鈥?bills.
CalcForexAdj(): A float function that takes a single argument of the power consumed in KWH, calculates and returns the foreign exchange adjustment cost.
CalcERBLevy(): A float function that takes a single argument of the power consumed in KWH, calculates and returns the Electricity Regulation Board Levy.
CalcREPLevy(): A float function that takes a single parameter of the power consumed, calculates the Rural Electrification Programme Levy.
CalcVAT(): A float function that takes a single argument of the power consumed in KES, calculates and returns the value added tax.
CalcPowerCost(): A float function that takes a single argument of the power consumed in KES, calculates and returns the total cost of the power consumed.
Hint: all other charges are nested and totaled in the CalcPowerCost() functionYou are unlikely to find anyone who will be willing to do this for you. Make a decent effort and then post again (with some code you've written) if you get stuck or have questions.
Are we supposed to do it for you?
没有评论:
发表评论