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
What is the key difference between UDP and TCP protocols in TCP/IP reference model?
g100num [7]

Answer:

TCP is a connection-oriented protocol, whereas UDP is a connectionless protocol. The speed for TCP is slower while the speed of UDP is faster.

5 0
2 years ago
Read 2 more answers
Permission must be sought in order to use a play that is in the public domain. True or False?
sertanlavr [38]

Answer:

False

Explanation:

Permission can't be sought in order to use a play that is in the public domain.

5 0
3 years ago
Read 2 more answers
Douglas Engelbart is credited with the invention of _____
kicyunya [14]
He created computer mouse
6 0
3 years ago
How would you experiment to find out how much water this plant type needs for optimal growth
dem82 [27]
Plant Growth Experiments The instructions below outline a protocol for conducting plant growth experiments in the laboratory. You may want to make adaptations for use in a greenhouse or outdoors. Purpose: To determine the effect of compost on plant germination and growth. Materials pots or planting trays compost soil seeds light source (sunlight or artificial lighting) Procedure 1. Design your own experiment. There are many possibilities--a few ideas are listed here, but the variations are endless: Test various combinations of soil and compost on plant growth. For example, you might wish to dig a soil sample from your school yard and mix it with various amounts of finished compost for planting experiments. (Natural soil is better than prepackaged potting soils for experiments such as this because the potting mixes are formulated for optimal plant growth and already contain significant amounts of compost or humus.) Another possibility is to mix your own potting soil by using vermiculite, sand, and compost. Creating several mixtures using the same percentages but different types of compost is a good way of comparing the influence of the various types of compost on plant growth. For example, you could compare compost at various levels of maturity, compost created using different mixtures of organic wastes, or vermicompost versus compost created in a thermophilic system. If you are interested in investigating the effects of compost tea on plant growth, you could fill the pots with a sandy soil or potting medium such as vermiculite, then use compost extracts for watering. 2. Whatever type of experiment you choose, make sure that you design your experiment to include replicates of the various treatments. For example, your design might look like the following: Treatment (% soil/% compost) # Flats (with 6 plants in each) # Plants 100% compost 3 18 25/75 3 18 50/50 3 18 75/25 3 18 100% soil 3 18 3. Plant your seeds, water them, and place them in a well-lit location. Many type of seeds will work, but radish or lettuce are often chosen because they grow quickly. Melon seeds are sensitive to fungal diseases, and thus they provide a sensitive indicator of whether fungi have been killed through heating or curing of the compost. 4. Keep all the pots in the same setting to minimize any variation in temperature, lighting, pests, and other environmental factors. Even when the environmental conditions are kept as constant as possible, it is a good idea to randomize the grouping of plants rather than placing all the plants that are receiving the same treatment together in one group. This helps to further minimize the effect of any environmental differences. 5. Record on a daily basis the number of seeds that have germinated, plant growth, and observations about plant health such as color, vigor, or damage due to pests and diseases. You can decide what measurements to use as indicators of plant growth; possibilities include plant height, number and size of leaves, and dry weight of the entire plant at the end of the experiment. (For dry weight, weigh the plant after drying in a 105C oven for 24 hours.) Analysis and Interpretation 1. Graph germination rates and plant growth over time for the different treatments. Also, determine the mean number of seeds germinated and mean size or mass of the plants at the end of the experiment. Compare average germination rates, plant growth, and health for the different experimental treatments. Based on your experiments, what was the optimal potting mix for plant germination? For plant growth? For plant health? 2. Some things may have gone wrong in your experiments. For example, you may have over-watered your plants, causing them all to die from fungal infection regardless of the treatment. Or you may have taken measurements only on plant height, and later decided that measuring the number of leaves and length of the main stem would have given better information. These types of problems are normal and can be used as a basis for redesigning the experiment. How might you change your experimental design if you were to carry out another set of growth experiments? 3. You may not find any differences between the treatments. Or, you may discover that the plants grown without compost did best. If this is the case, it may be difficult to determine whether the compost had no effect, or you did something wrong. The tendency is to assume the compost really has an effect and to attribute insignificant or negative results to experimental mistakes. However, the interpretation of results should not be biased by your predictions or preconceived ideas about the way experiments will turn out. Often unexpected results lead to important insights and questions. Maybe your compost is of poor quality, or maybe the plant species you chose grows well in poor soils. Explore all the possibilities for explaining your results with an open mind, through discussions and new experiments.
6 0
3 years ago
[Please Help ASAP!]
iragen [17]
The answer has to be C
3 0
3 years ago
Other questions:
  • Your Economics teacher has asked you to create a chart showing how supply and demand affects the price of gasoline. Which applic
    13·2 answers
  • You can use automatic link-checking software to identify invalid hyperlinks. if you find invalid links, what should you do next?
    13·1 answer
  • Jim is a forensic specialist. He seized a suspect computer from a crime scene, removed the hard drive and bagged it, documented
    10·1 answer
  • Mary, Tim, John, and Jenn each sold three million dollars worth of product within six months. Each month one of them was awarded
    12·2 answers
  • The
    6·2 answers
  • Write a short program using Python that will:
    10·1 answer
  • I need help with cisco please
    12·1 answer
  • Cuantos MB son 8,192 kb?​
    13·1 answer
  • Can you guys help me with this coding assignments?
    10·1 answer
  • Sistem komponen mekanikal yang terdapat pada sebuah basikal?​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!