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
You will write a program to calculate electricity bill for 5 customers. Use multi-file development for this problem (.h,
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am