Question: Write a C++ program that will calculate a print out a bills for the city water company. The water rates vary, depending on the whether

Write a C++ program that will calculate a print out a bills for the city water company. The water rates vary, depending on the whether the bill is for residential use , commercial use, or industrial use. A code r means residential use, a code c means commercial use, and a code i means industrial use. Any other code should be treated as error. The water rates are computed as follows. Code r : $5.00 plus $.005 per gallon used plus $6.00 community service plus $8.35 drainage service plus $7.80 Street Service Code c : $1000.00 for the first 2 million gallons used and $0.00025 for each additional gallon plus $10.00 community service plus $12.35 drainage service plus $15.80 Street Service Code i : $1500.00 if usage does not exceed 3 million gallons ; $2500.00 if usage is more than 3 million gallons but does not exceed 7 million gallons , and $4000.00 if usage exceeds 7 million gallons plus $15.00 community service plus $28.35 drainage service plus $37.80 Street Service Your program should prompt the user to enter customer name or company name , account number , the code , and the gallons of water used . your program should echo on screen the input data entered and display file The Bill Summary. Look at the sample run for the exact output / output format . Note - 1 : Must define and use switch & if .. else . Notes - 2 : The following must be defined & used as constant variables For each code Community service , Drainage service , and Street Service are constants 2 million , 3 million , 4 million , 7 million are constants For each code $5.00 , $1000.00 , and $1500.00 are constants Validations Account type must be h or c or i Account Number must be > 0 Number of Gallons used must be > 0 The program must terminate if any of the above takes a place.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!