Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C++ Project 3.4.1. Pringle Water Co. is a water company that supplies water to homes and businesses in a town. They need a computer

In C++

image text in transcribed

image text in transcribed

Project 3.4.1. Pringle Water Co. is a water company that supplies water to homes and businesses in a town. They need a computer program to compute and print the monthly bills for their customers. Some of the customers participate in the "Super Savings Plan" which offers them some savings (as described below). When the program runs, the system should interactively obtain the following information from the user: (1) Customer identification number (2) Last reading of the water meter. (3) New reading of the water meter. (4) Whether or not the customer is in the Super Savings Plan. The difference between the last and the new readings of the meter is the number of units of water used by the customer. It is difficult to write statements to read and process "yes" or "no" type answers for the question of whether or not the customer is under Super Savings Plan. Therefore, the recommended approach is to have the user enter 1 for "yes" and 0 for "no" and use this numeric data in the program. Bills are computed by using the following method. (a) For all the customers there is a service charge of $8.00. (b) Charges for the used water are computed by using the following strategy: Number of units of water used Charge rate (cents per unit) Under 200 200 or over but less than 800 7 800 or over 5 (c) Super Savings Plan participants are charged a $6.00 fee. (d) Super Savings Plan participants receive 20% discount if the total bill (from (a), (b) and (c) above) exceed $35.00. 8 (e) A 6% tax is added to the total charge, to determine the final bill. The final bill amount must be rounded to the nearest hundredth (two decimal digits) to display the money in the usual way. Program must have your name typed as part of the comments at the top. Program must consist of comments explaining blocks of statements. Proper indentation must be used to aid easy reading. Information on the bill must be written as shown in the sample bill below or in a better way. Execute the program three times and enter the following three lines of data to produce three bills. Print each output window along with program. If the full program is not visible in at least one of the three printouts, then print the program file also. Data: Customer ID Previous reading New reading Super Savings Plan?(1=yes, O=no) 458 43020 43492 1 459 64825 65728 0 460 37965 38097 Sample Output (and answer for the first line of data): Customer ID: 458 Super Saver? : Yes Previous reading :43020 New Reading : 43492 Number of units of water used: 472 Charges :$33.04 Tax :$2.2579 Amount due : $39.89

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions

Question

Discuss all branches of science

Answered: 1 week ago