CMSY 141 Lab 1 – Laptop Purchase

Inputting data, using constants, calculating, and formatting

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 upgrades you select.  This value is \$12.50.

The state sales tax is 6% 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 + upgrades).  The remaining amount will be financed.  Note: the amount financed does not include the disposal fee and sales tax.  These are paid separately at purchase time.

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 total cost (purchase price + upgrades + disposal fee + sales tax)
6. Calculate the down payment based on the (purchase price +  upgrades).
7. Display the following:
1. The make and model of the laptop
1. The base price of the laptop
1. The price of upgrades for the laptop
1. The disposal fee for the laptop
1. The sales tax for the laptop
1. The total cost of the laptop
1. The down payment for the laptop
1. The total due at purchase time: Down payment + Sales tax + Disposal fee
1. The total amount that will need to be paid after the down payment (finance amount)

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.

Use the test data below.  Create screenshots of  your program (like below) using both sets of test data. Remember to use your own name.  Submit the .cpp code file and the screen shots (.docx) files in Canvas.

Rubric:

1. Program is neat, indented and contains comments (5 points)
2. Constants are correctly declared, commented and used (5 points)
3. Correct variable types are used.  Variable names are meaningful.  Variables are commented (5 points).
4. Allow entry of two or more word laptop name (2 points)
5. Allow entry of base price and upgrade cost (3 points)
6. Proper calculation of sales tax, total cost, down payment and finance amount, and total due (10 points)
7. Display of base price, upgrade price, disposal fee, sales tax, total cost, down payment total due at purchase, and finance amount.  (5 points)
8. Display include “\$”, has two decimal places and is properly formatted (10 points)
9. Program compiles and runs without crashing (5 points)
Calculate your paper price
Pages (550 words)
Approximate price: -

Reasons to trust Research Paper 101

On Time Delivery

We pride ourselves in meeting the deadlines of our customers. We take your order, assign a writer but allow some more time for ourselves to edit the paper before delivering to you. You are guaranteed a flawless paper on a timely manner...

24x7 Customer Live Support

Our team at Research Paper 101 is committed to handling your paper according to the specfications and are available 24*7 for communication. Whenever you need a quick help, you can talk to our writers via the system messaging or contact support via live chat and we will deliver your message instantly.

Experienced Subject Experts

Online Experts from Research Paper 101 are qualified both academically and in their experiences. Many are Masters and Phd holders and therefore, are qualified to handle complex assignments that require critical thinking and analyses...

Customer Satisfaction

We offer dissertation papers as per students’ wishes. We also help craft out the best topics and design concept papers. By ordering with us, you are guaranteed of defending and making through those hard faced professors in the defense panel!

100% Plagiarism Free

We at Research Paper 101 take plagiarism as a serious offence. From the start, we train our writers to write all their papers from scratch. We also check if the papers have been cited appropriately. Our website also has a tool designed to check for plagiarism that has been made erroniusly. In essense, the paper you get will be 100% legit...

Affordable Prices

We understand that being a student is very challenging, some students balance between work and studies in order to survive. We therefore offer pocket friendly rates that are very competitive in the market.

Try it now!

Calculate the price of your order

Total price:
\$0.00

How it works?

Follow these simple steps to get your paper done

Fill in the order form and provide all details of your assignment.

Proceed with the payment

Choose the payment system that suits you most.

Receive the final file

Once your paper is ready, we will email it to you.

Our Services

No need to work on your paper at night. Sleep tight, we will cover your back. We offer all kinds of writing services.

Essay Writing Service

No matter what kind of academic paper you need and how urgent you need it, you are welcome to choose your academic level and the type of your paper at an affordable price. We take care of all your paper needs and give a 24/7 customer care support system.