You will write a program to calculate electricity bill for 5 customers. Use multi-file development for this problem (.h,

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

You will write a program to calculate electricity bill for 5 customers. Use multi-file development for this problem (.h,

Post by answerhappygod »

You will write a program to calculate electricity bill for 5customers. Use multi-file development for this problem (.h, .cppfiles). The header file should contain the class declaration, theclass file should contain definition of class member functions, andfinally, the driver file should contain the main().
Define a classcalled Electric_Bill withfollowing members:
The class willhave setter and getter functionsto set customer number, customer name, units of electricity used.The class will also have a functioncalled calc_bill() that returnsthe bill amount computed. The class will havea display () to display thecustomer details with bill amount on screen. The class should havea default constructor that initialize string variables to "" andnumerical variables to 0.
Use the table below to compute electricity bill amount:
Write a main () to test the functionality of your program(instantiate the class, call setter functions, calc_bill function,and display function to test your program.
Name them as Electric_Bill.h,Electric_Bill.cpp, and DriverElectric_Bill.cpp
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply