An electricity board charges the following rates to domestic users to discourage large consumption of energy.
· For the first 100 units − 50 P per unit
· Beyond 100 units − 60 P per unit
If the total cost is more than Rs.250.00 then an additional surcharge of 15% is added on the difference. Define a class Electricity in which the function Bill computes the cost. Define a derived class More_Electricity and override Bill to add the surcharge.
Comments
Leave a comment