Hello guys... I wanna write a program that calculates a customer’s bill for the electric company. But there are two types of customers: residential and commercial. There are two rates for calculating an electric bill.

Resident rates – Bill processing fee = $12.50
Service fee = $30.50
Alternative energy fee = $7.50

commercial rates - Bill processing fee = $20.00
Service fee = $150.00
Alternative energy fee = $80.00

The program should ask for an account number and customer code. Assume that R or r is for residential and C or c stands for commercial
And my input should include customer account number, customer code, ask for alternative energy. Service fees are included in the billing.

7 Years
Discussion Span
Last Post by firstPerson

So, I am guessing you learned about structs and classes? If so then
go ahead and make a Residential and Commercial class. In fact you can
use some inheritance, and polymorphism here, but I guess we can keep it simple.

Votes + Comments
Yes, I think it needs a queue, a finite state machine and some template programming too.
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.