.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.

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter11: Inheritance And Composition
Section: Chapter Questions
Problem 29SA
icon
Related questions
Question
I want simple C++ code as I am a beginner.
6.3. 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 – 60P
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.
Transcribed Image Text:6.3. 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 – 60P 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.
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Structured English
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr