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
You create a storyboard at the _____ stage of web development
ddd [48]

Answer:

initial stage of web development.

4 0
3 years ago
Read 2 more answers
You can use the ____ command to delete an entire table and its data.?
jek_recluse [69]
You can press control and x at the same time, the delete button, or backspace
6 0
3 years ago
A client computer networked to a server computer, with processing split between the two types of machines, is called a(n) ______
butalik [34]
<span>Two-tiered client/server architecture. The two-tier is based on Client Server architecture. The two-tier architecture is like client server application. The direct communication takes place between client and server. There is no intermediate between client and server. Because of tight coupling a 2 tiered application will run faster</span>
6 0
3 years ago
For those that play pc games how do you go outside in The Sims 2?
yanalaym [24]

Answer:

My sister plays a lot of the sims 4 but I do recall she also played the Sims 2 so when she would go outside she would command them to do that.

Explanation:

If this does not work I would suggest you get a video that can explain it better than I possibly would? Considering the Sims 2 was made a while back you would maybe want somebody with a little more experience.

5 0
2 years ago
Read 2 more answers
What number is needed to complete the pattern 66, 73, 13, 21, 52,_, 10, 20?
Lilit [14]
66,73 73-66=7
13,21 21-13=8
10,20 20-10=10

the missing no. is 9 so
52+9=61.

the pattern is
66,73,13,21,52,61,10,20





8 0
3 years ago
Other questions:
  • Cari brought 2 pounds of grapes at the grocery store she ate 5 ounces of the grapes on way home what is the weight of the grapes
    12·1 answer
  • What guidelines should you follow when adding graphics to your presentations?
    14·2 answers
  • Which of the following commands is more recommended while creating a bot?
    9·1 answer
  • Which extensions can help drive installs of your mobile app?
    12·1 answer
  • Im being timed please help!!
    7·2 answers
  • Each webpage is assigned a(n) ______, an address that identifies the location of the page on the Internet.
    6·1 answer
  • Samira works for a large U.S. company that has factories all over the world. Samira returned to the U.S. after visiting several
    9·1 answer
  • (1) Prompt the user to enter two words and a number, storing each into separate variables. Then, output those three values on a
    5·1 answer
  • Na2CO3 → Na2O + what
    13·2 answers
  • (lesson 7.9: acceptance-rejection --- continuous examples.) consider the constant . on average, how many iterations (trials) wil
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!