Question
In this assignment, you will develop a C++ program and a flowchart that calculates a cost to replace all tablets and desktop computers in a
In this assignment, you will develop a C++ program and a flowchart that calculates a cost to replace all tablets and desktop computers in a business. Customers paying cash get a ten percent discount applied to the total cost of the computers (desktop and tablets). Customers financing the purchase incur a fifteen percent finance charge based on the total cost of the computers (desktop and tablets). Tablets costs $320.00 each and desktops costs $800.00 each. The tax is 75% (.075).
Requirements: Use the following variables of the appropriate type: name of company selling the computers, the cost per each type of computer, number of computers to be purchased, discount if paying cash, sales tax rate. Tablets =$320 each and desktop computers = $800.00 each. Sales Tax Rate = .075, Discount Percent = .10, and Finance Charge = .15. Variable names must be descriptive. Use additional variables to hold subtotals and totals. For customers paying cash, the discount should be subtracted from the total computer cost. For customers financing the purchase, the finance charge should be added to the total computer cost. The body of your program must use variables only; there should not be any hard coded values in the output statements. An example of hardcoding is ***Cost of tablets = 4 * 320****. Use cout to output the values of the variables to the console. Your cout statement MUST use the variables to display the values Display the cost of the computers, tax and average cost per computer. The average cost will be the total cost divided by the number of computers purchased. Display the discount if the customer decides to pay cash or the finance charge if the customer finances the purchase. Output must be labelled and easy to read as shown in the sample output below. Program must be documented with the following: // Name // Date // Program Name // Description Develop a flowchart
Hints: Total cost of computers = cost per tablet * number of tablets purchased + cost per desktop * number of desktops purchased Calculate the cost if paying cash or financing Calculate the tax Average cost per computer = Total computer cost divided by the number of computers purchased
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started