1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Marysya12 [62]
3 years ago
14

In this assignment, you will develop a C++ program and a flowchart that calculates a cost to replace all tablets and desktop com

puters 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

Computers and Technology
1 answer:
Alexeev081 [22]3 years ago
5 0

Answer:

Explanation:

The objective of this program we are to develop is to compute a C++ program and a flowchart that calculates a cost to replace all tablets and desktop computers in a business.

C++ Program

#include<iostream>

#include<iomanip>

using namespace std;

/*

⦁ // Name:

⦁ // Date:

⦁ // Program Name:

⦁ // Description:

*/

int main()

{

const double SalesTaxRate = .075, DiscountPercent = .10, FinanceCharge = .15;

const double TABLET = 320.00, DESKTOP = 800.00;

double total = 0.0, subTotal = 0.0,avg=0.0;

int numberOfTablets, numberOfDesktop;

cout << "-------------- Welcome to Computer Selling Company ------------------ ";

cout << "Enter number of tablets: ";

cin >> numberOfTablets;

cout << "Enter number of desktops: ";

cin >> numberOfDesktop;

subTotal = TABLET * numberOfTablets + numberOfDesktop * DESKTOP;

char choice;

cout << "Paying cash or financing: (c/f): ";

cin >> choice;

cout << fixed << setprecision(2);

if (choice == 'c' || choice == 'C')

{

cout << "You have choosen paying cash." << endl;

total = subTotal - subTotal * DiscountPercent;

cout << "Discount you get $" << subTotal * DiscountPercent<<endl;

cout << "Sales Tax: $" << SalesTaxRate * total << endl;

total = total + total * SalesTaxRate;

cout << "Total computers' Cost: $" << total << endl;

avg = total / (numberOfDesktop + numberOfTablets);

cout << "Average computer cost: $ " << avg << endl;

}

else if (choice == 'f' || choice == 'F')

{

cout << "You have choosen Finance option." << endl;

total = subTotal + subTotal * FinanceCharge;

cout << "Finance Charge $" << subTotal * FinanceCharge << endl;

cout << "Sales Tax: $" << SalesTaxRate * total << endl;

total = total + total * SalesTaxRate;

cout << "Total computers' Cost: $" << total << endl;

avg = total / (numberOfDesktop + numberOfTablets);

cout << "Average computer cost: $ " << avg << endl;

}

else

{

cout << "Wrong choice.......Existing.... ";

system("pause");

}

//to hold the output screen

system("pause");

} }

OUTPUT:

The Output of the program is shown in the first data file attached below:

FLOWCHART:

See the second diagram attached for the designed flowchart.

You might be interested in
PLZZZZZ HELP!!!!!!!!!!
TiliK225 [7]

I'd say the best option would be B.

7 0
3 years ago
In Bash, what commands can you use to view the contents of a document?
AlekseyPX

You can use the cat and less command to view the contents of a file.

hope this helps! :)

8 0
1 year ago
____ lets you store your data remotely and access it with any device connected to the internet.
Gre4nikov [31]
Either iCloud or air drop
6 0
3 years ago
What conversion factor should be used to convert from meters to Gigameters?
hodyreva [135]
Meters * 1,000,000,000 = gigameters
5 0
3 years ago
Write a loop that fills a list values with ten random numbers between 1 and 100. Write code for two nested loops that fill value
Alex787 [66]

Answer:

Please look for your answer on Stack Overflow, it's way better.

Explanation:

4 0
2 years ago
Other questions:
  • If you define CSS rules on a parent control, the rules will be inherited by all of the children widgets.
    12·1 answer
  • 6. Which of the following is malware? (1 point)
    15·2 answers
  • In 5-10 sentences, describe the purposes, design considerations, and common elements of most brochures.
    6·1 answer
  • Which of the following is a list of input devices?
    11·1 answer
  • A company wants a recruiting app that models candidates and interviews; displays the total number of interviews each candidate r
    6·1 answer
  • You’re having trouble connecting to the Internet so you call your Internet service provider for help. They need to know the perm
    15·1 answer
  • Naynar kis dhrm se sambandhit hai​
    15·2 answers
  • Which user interface part shows graphical output of mined data?
    8·2 answers
  • How did transistors revolutionize the world of computers?
    15·1 answer
  • Which of the following statements is true of infrastructure?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!