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
The ____ line for any e-mail messages you write should clearly state the intention of the e-mail..
KatRina [158]

The <u>subject </u>line for any e-mail messages you write should clearly state the intention of the e-mail.

Electronic mail (e-mail) is a method of digital communications in which messages are exchanged through the internet. The messages are sent from a sender to one or more receivers.  Depending on user’s perspective, every user uses e-mail differently.  Communicating via e-mail requires e-mail platforms such as G*mail, Ya*hoo! Mail, Hot*mail, and Out*look etc. In the every e-mail, there is a subject line that clearly state the intention of the e-mail.

Subject line is an important element of an e-mail. Through the subject line, the message written in the e-mail is briefly summarized in six to eight words. A clearly written subject line provides the recipient a clear understanding that why the email has been sent. When recipient replies back to the e-mail, the subject line is changed accordingly.

This is the subject line of the e-mail that convince the receiver whether to open and read the e-mail. So, it should be written in the way that gives clear intention of the e-mail. We can say that the subject line of the e-mail is the most significant few words in the whole e-mail to convey the main purpose of the e-mail.

You can learn more about subject line at

brainly.com/question/14572730

#SPJ4

3 0
1 year ago
Which of the following job duties would a software developer perform?
juin [17]

<u>The most important job duty of a software developer is to develop a product/program that is easy to use and melts a customer’s need.</u>

<u></u>

Explanation:

Some other duties of  a Software developer are

  • Researching,designing and implementing new software program's and then managing them
  • Testing and evaluating the developed software program's
  • Identifying errors in the existing program's and modifying the same
  • Writing effective codes
  • employing various software tools
  • Training new users
  • Working closely with the other developers

8 0
3 years ago
QUICK PLZZZZZZZ Which one of the following is considered a peripheral? A Software B Mouse C USB connector D Motherboard
il63 [147K]

A MOUSE is considered a peripheral. A peripheral device connects to a computer system to add functionality.

6 0
3 years ago
A government agency is getting rid of older workstations. The agency will donate these workstations, along with other excess com
Basile [38]

Answer:

The answer is "Using the DoD 5220.22-M method and  Degauss media with a magnet".

Explanation:

The "DoD Standard" is a term used during the data sanitizing industry and refers to DoD 5220.22-M. The simplest ways are being used to help eliminate the previously stored data, by deleting hard disc storage facilities with the same data wherever that used a sequence of all zeros.

The sparging eliminates statistics to entirely delete the gravitational flux from electronic media. Hard drives as well as other data storage devices, for example, computer tapes, retain magnetic data. It could no longer be seen as storage after a disk is degaussed.

6 0
3 years ago
The Danger zone around a robot is?
mojhsa [17]

maybe a EMP. tell me if im right

3 0
3 years ago
Read 2 more answers
Other questions:
  • What is DAP? How LDAP is different from DAP?
    10·1 answer
  • A biologic reaction is produced by 4 Gyt of a test radiation. It takes 16 Gyt of 250-kVp x-rays to produce the same biologic rea
    11·1 answer
  • FRee points just put something
    14·2 answers
  • What is an border in html
    8·1 answer
  • Whose job is it to ensure that a group stays focused and on schedule?
    8·1 answer
  • Ask the user to input a word. Then, print the first letter, the last letter, and the length of the word on the same line with no
    6·1 answer
  • What does this map key show
    12·1 answer
  • Constructive criticism is intended as a possible solution.
    13·1 answer
  • This isn't an academic question, but can anyone help me change the face on my apple watch to a picture from my camera roll? I've
    15·1 answer
  • TO Cloud
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!