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
A _____ network is where all computers are equal and each one is both data requester and data provider.
andre [41]

Answer:

peer-to-peer network

Explanation:

i think i'm not sure though so tell me if it is wrong :)

8 0
2 years ago
A(n) ___ is a set of CPUs which work in parallel in an attempt to simulate the way the human brain works, although in greatly si
zhuklara [117]

By definition, a neutral network is a set of CPUs which work in parallel in an attempt to simulate the way the human brain works, although in greatly simplified form.

A neutral network processor is a CPU that takes the modeled operation of how a human brain works on a single chip.

Neutral network processors reduce the requirements for brain-like computational processing of entire computer networks that excel in complex applications such as artificial intelligence, machine learning, or computer vision down to a multi-core chip.

In other words, astificial neutral networks are a computational model that consists of a set of units, called artificial neurons, connected to each other to transmit signals. The input information traverses the neutral network (where it undergoes various operations) producing output values. Its name and structure are inspired by the human brain, mimicking the way biological neurons signal each other.

So the goal of the neutral network is to solve problems in the same way as the human brain, although neural networks are more abstract.

In summary, a neutral network is a set of CPUs which work in parallel in an attempt to simulate the way the human brain works, although in greatly simplified form.

Learn more:

  • brainly.com/question/474553?referrer=searchResults

7 0
3 years ago
Absolute time would be most similar to :
Luda [366]
The absolute time would be most similar to a fact. It was theorised and in fact, approved by scientists as a scientific law which governs, according to Wikipedia, as a "<span>true and mathematical </span>time<span>, of itself, and from its own nature flows equably without regard to anything external, and by another name is called duration: relative, apparent and common </span><span>time."</span>
3 0
3 years ago
By default, PowerPoint ends a slide show with a black slide. <br> a. True<br> b. False
Dmitry [639]
True . Because Press " ESC " To Exit Off Of Slide . 
5 0
3 years ago
Read 2 more answers
Professor Midas drives an automobile from Newark to Reno along Interstate 80. His car’s gas tank, when full, holds enough gas
zmey [24]

Answer:

The GREEDY Algorithm

Explanation:

Based on the situation given in question, the Greedy algorithm shall give the optimal solution to professor

Suppose that the cities are at locations0 =x0< x1< . . . < x

We shall use the induction method to prove that G is the optimal solution valid for numbers less than n

We assume another solution Z which we initially consider to be optimum as well, based on that when Z fills the tank, it fills it to full level

Let us state the values in case of n intervals. Given below, we say that g1 is the first stop and z1 is also the first stop.

This can be written as ;

G=g1, g2, . . . , gk

Z=z1, z2, . . . , zk’

Here k’ <= k and k < n

Let I be an idex where for the first time gi is not equal to zi

Considering t= maxi Zi

Z′=g1, z2, z3, . . . , zk′

Now since z2, z3, . . . , zk′ should be an optimal stopping pattern for the problem otherwise we have chosen Z, with smaller gas filling (not feasible)

Using induction hypothesis we conclude thatg2, . . . , gk is an optimal stopping pattern, which is based on greedy algorithm

7 0
3 years ago
Other questions:
  • True False The explicit location always tells you where users are located when they type the query.
    10·2 answers
  • Which occupation requires certification by the state?
    15·2 answers
  • How does this splitting wedge make work easier?
    15·1 answer
  • You are requesting information about wireless connectivity for your workplace computers. Because you expect the information to b
    15·1 answer
  • Which of the following is an advantage of using
    6·2 answers
  • How to create an app on app store please its not a joke, if someone knows tell me how
    15·1 answer
  • What is the CPU's role?
    15·2 answers
  • What is the meaning of FTTH
    9·2 answers
  • assume there are K sorted lists, each of n/k elements. We want to merge them into a single sorted list of n elements. Give an op
    7·1 answer
  • Range paramters - for loop<br> question in picture
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!