In this assignment, you will develop a C++ program and a flowchart that calculates a cost to replace all generators and solar panels for an energy business. Customers paying cash get a ten percent discount applied to the total cost of generator and solar panels. Customers financing the purchase incur a fifteen percent finance charge based on the total cost of the generator and solar panels. Generators costs $7500.00 each, and solar panels cost $500.00 each. The tax is 7.5% (.075).
1. Use the following variables of the appropriate type: name of the company selling the energy equipment, the cost per each generator and solar panels, number of purchased, discount if paying cash, sales tax rate. Generator costs $7500 each, and solar panels cost $500.00 each. Sales Tax Rate = .075, Discount Percent = .10, and Finance Charge = .15.
2. Variable names must be descriptive.
3. Use additional variables to hold subtotals and totals.
4. For customers paying cash, the discount should be subtracted from the total equipment cost.
5. For customers financing the purchase, the finance charge should be added to the total energy equipment cost.
6. The body of your program must use variables only; there should not be any "hardcoded" values in the output statements. An example of hardcoding is
cout<<" Cost for 6 solar panels is $3000.00<
7. Use cout to output the values of the variables to the console. Your cout statement MUST use the variables to display the values
8. Display the cost of the equipment, tax and average cost per piece of equipment. The average cost will be the total cost divided by the number of generator and solar panels purchased. Display the discount if the customer decides to pay cash or the finance charge if the customer finances the purchase.
9. Output must be labeled and easy to read, as shown in the sample output below.
10. The program must be documented with the following:
a. // Name
b. // Date
c. // Program Name
d. // Description
11. Develop a flowchart