Question: C++ Coding Inputting data, using constants, calculating, formatting C++ You are going to buy a new laptop. As a smart consumer, you are going to

C++ Coding Inputting data, using constants, calculating, formatting

C++

You are going to buy a new laptop. As a smart consumer, you are going to have to determine

the actual price of the laptop and the how much you will pay for laptop.

The total price of the laptop consists of four things:

1. The base price of the laptop

2. The cost of the RAM and hard drive upgrade

3. The disposal fee for the old laptop (for the lithium battery)

4. The state sales tax

The disposal fee is constant for any laptop, regardless of the number of options you select. This

value is $12.50.

The state sales tax is 6.5% of the total price of the laptop and the upgrades; there is no tax on

the disposal fee.

The down payment for the laptop is the 11% of the total cost of the laptop (purchase price +

options + license fee + sales tax). The remaining amount will be financed.

Write a program that does the following:

1. Ask the user for the make and model of the laptop (for example Dell Inspiron 13). This

should be at least two words.

2. Ask the user for the base price of the laptop.

3. Ask the user for the cost of the upgrades selected.

4. Calculate the sales tax.

5. Calculate the down payment.

6. Display the following:

a. The make and model of the laptop

b. The base price of the laptop

c. The upgrade cost for the laptop

d. The disposal fee for the laptop

e. The sales tax for the laptop

f.

The total cost of the laptop

g. The down payment for the laptop

h. The total amount that will need to be paid after the down payment

Remember: all the costs are in dollars, so each value needs to be displayed with a dollar sign

($) and must be displayed to two decimal places. All the text should be left justified and all

the costs should be right justified (with the decimal points lining up as shown in the sample

output).

Constants are required and need to be used for the various calculations. Determine what

constants your will need.

Be sure to get all the

input

then do all of the math (

processing

). Finally show all of the

output

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!