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]
4 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]4 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
(10 points) A stopwatch has three states named Zero, Running, and Stopped. There are two buttons, named B1 and B2. For each butt
solniwko [45]

Answer:

see explaination

Explanation:

State Diagram based on given in the problem and state table, k-map for j and k, based j and k expressions we can draw the (FSM )controller using j and j flip flop.

see attachment for this.

6 0
3 years ago
does someone know of a website where I can find free essays or assignments already answered (right or wrong, ain't matter), kind
nalin [4]

Answer:

Your

Explanation:

Taking answers from online is plagiarism. If you get caught, you could get in trouble. If you don't know the subject well enough that doesn't matter because apparently you don't care your grade.

5 0
3 years ago
Write a pseudocode thats accept and then find out whether the number is divisible by 5 ​
meriva

Answer:

input number  

calculate modulus of the number and 5  

compare outcome to 0  

if 0 then output "divisible by 5"  

else output "not divisible by 5"

Explanation:

The modulo operator is key here. It returns the remainder after integer division. So 8 mod 5 for example is 3, since 5x1+3 = 8. Only if the outcome is 0, you know the number you divided is a multiple of 5.

3 0
4 years ago
In the 2007/2010 version of Paint, which of the following tools are located in the View tab? (Select all that apply.)
zaharov [31]
The answers are full screen and gridlines.
7 0
4 years ago
Ashley works for a company that helps hospitals hire new doctors. They have written a list of strategies that can be used to int
enyata [817]

Answer:

A file.

Explanation:

A file can be defined as a computer resource used for the collection of data (informations) as a single unit.

Basically, files are of different types or in various formats (forms) and these includes document, video, audio, image, software application, data library etc.

Additionally, various operations such as open, close, edit, format, delete, save, rename, compress etc. can be performed on a file through the use of specific software applications or programs.

In this scenario, Ashley wants to give a list of strategies that can be used to interview doctors to their supervisor to review.

Hence, what Ashley should give to the supervisor to do a review is a file.

6 0
3 years ago
Other questions:
  • The _____ layer of the Open Systems Interconnection (OSI) model generates a receiver’s address andensures the integrity of messa
    6·1 answer
  • Another important mode, XTS-AES, has been standardized by the __________ Security in Storage Working Group. a. IEEE b. ITIL c. N
    9·2 answers
  • The atomic number of oxygen is 8. the atomic mass of oxygen is 16. him many neutrons does oxygen have
    12·1 answer
  • The array index can be any nonnegative integer less than the array size.
    10·1 answer
  • how do I comment on answers? there's one answer I'm confused about but I don't know how to comment on it
    7·2 answers
  • As a graphic designer, you'll refer to a line as which of the following? A. Point B. Border C. Rule D. Frame
    9·2 answers
  • A(n) ________________ must be completed immediately following an incident as it is an essential document that details an inciden
    14·1 answer
  • When a recipient responds to a meeting request, which statement most accurate descries what occurs?
    5·2 answers
  • Assume variable age = 22, pet = "dog", and pet_name = "Gerald".
    6·1 answer
  • What is the scope of AS-26
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!