Question

In: Computer Science

PLEASE TYPE OUT IN TEXT (please no pdf or writing) C++ PLEASE Summary For each used...

PLEASE TYPE OUT IN TEXT (please no pdf or writing)

C++ PLEASE

Summary

For each used car a salesperson sells, the commission is paid as follows: $20 plus 30% of the selling price in excess of the cost of the car.

Typically, the minimum selling price of the car is the cost of the car plus $200 and the maximum selling price is the cost of the car and $2,000.

Instructions

Write a program that prompts the user to enter:

  1. Purchasing cost of the car
  2. The minimum to be added to the purchasing cost
  3. The maximum to be added to the purchasing cost
  4. Salesperson’s fixed commission
  5. Percentage of the commission

The program should output:

  1. The minimum and maximum selling price of the car
  2. The salesperson’s commission range

Since your program handles currency, make sure to use a data type that can store decimals.

Solutions

Expert Solution

C++ Program:

#include <iostream>

#include <iomanip>

using namespace std;

int main()

{

double purCost, minAdd, maxAdd, fixedComm, commPercentage, minSP, maxSP, commLow, commHigh;

  

cout << fixed << setprecision(2);

  

//Reading input from user

cout << "Enter Purchasing cost of the car: $";

cin >> purCost;

  

cout << "Enter minimum to be added to the purchasing cost: $";

cin >> minAdd;

  

cout << "Enter maximum to be added to the purchasing cost: $";

cin >> maxAdd;

  

cout << "Enter salesperson fixed commission: $";

cin >> fixedComm;

  

cout << "Enter salesperson Percentage of commission: ";

cin >> commPercentage;

  

// Calculatin minimum and maximum selling price of the car

minSP = minAdd + purCost;

maxSP = maxAdd + purCost;

  

//Calculating salesperson commission range

commLow = fixedComm + ( (commPercentage/100.0) * minAdd );

commHigh = fixedComm + ( (commPercentage/100.0) * maxAdd );

  

//Printing results

cout << "\n\n Minimum Selling Price of the Car: $" << minSP;

cout << "\n Maximum Selling Price of the Car: $" << maxSP;

  

cout << "\n Salesperson Commission Range: $" << commLow << " to $" << commHigh << "\n\n";

return 0;

}

Sample Run:


Related Solutions

TEXT ONLY PLEASE (PLEASE NO PDF OR WRITING) C++ CODE Summary Samantha and Vikas are looking...
TEXT ONLY PLEASE (PLEASE NO PDF OR WRITING) C++ CODE Summary Samantha and Vikas are looking to buy a house in a new development. After looking at various models, the three models they like are colonial, split-entry, and single-story. The builder gave them the base price and the finished area in square feet of the three models. They want to know the model(s) with the least price per square foot. Instructions Write a program that accepts as input the base...
TEXT ONLY PLEASE ( PLEASE NO PDF OR WRITING) C++ CODE Instructions In a right triangle,...
TEXT ONLY PLEASE ( PLEASE NO PDF OR WRITING) C++ CODE Instructions In a right triangle, the square of the length of one side is equal to the sum of the squares of the lengths of the other two sides. Write a program that prompts the user to enter the lengths of three sides of a triangle and then outputs a message indicating whether the triangle is a right triangle. If the triangle is a right triangle, output It is...
TEXT ONLY PLEASE (PLEASE NO PDF OR WRITING) C++ CODE Instructions Write a program that implements...
TEXT ONLY PLEASE (PLEASE NO PDF OR WRITING) C++ CODE Instructions Write a program that implements the algorithm given in Example 1 - 3 (Chapter 1), which determines the monthly wages of a salesperson. The instructions for Example 1 - 3have been posted below for your convenience. Example 1 - 3 Every salesperson has a base salary. The salesperson also receives a bonus at the end of each month, based on the following criteria: If the salesperson has been with...
Please answer for college physics discussion post. Please only type out the response as when writing...
Please answer for college physics discussion post. Please only type out the response as when writing it and uploading it is difficult to read. Thanks! Respond to the following in detail: In your own words, explain angular momentum, moment of inertia, and torque. Also give examples.
Please answer Part 2 (b) And please type your answer,hand-writing is sometimes hard to figure out...
Please answer Part 2 (b) And please type your answer,hand-writing is sometimes hard to figure out Before mid-night thanks Part 1 Waterways has a sales mix of sprinklers, valves, and controllers as follows. Annual expected sales: Sale of sprinklers 460,000 units at $26.50 Sale of valves 1,480,000 units at $11.20 Sale of controllers 60,000 units at $42.50 Variable manufacturing cost per unit: Sprinklers $13.96 Valves $ 7.95 Controllers $29.75 Fixed manufacturing overhead cost (total) $760,000 Variable selling and administrative expenses...
Engineering Economic Analysis PLEASE TYPE OUT THE RESPONSE TO EACH QUESTION Why is an understanding of...
Engineering Economic Analysis PLEASE TYPE OUT THE RESPONSE TO EACH QUESTION Why is an understanding of depreciation important in performing economic analyses? After learning in CH 8 about depreciation, which is a non-cash expense, how does the method used affect income taxes, and why is this important from an economic analysis perspective? How does rationing affect Capital Decisions? Distinguish between Independent Opportunities and Mutually Exclusive Opportunities. Please explain from a risk perspective, the potential ramifications of making an incorrect Capital...
Please identify the type of training evaluation used in each scenario. Your choices for each scenario...
Please identify the type of training evaluation used in each scenario. Your choices for each scenario are one of the four types of evaluation: 1. Results Evaluation; 2. Behavioral Evaluation; 3. Learning Evaluation; 4. Reaction Evaluation A. A curator of a traveling new exhibit examines the wear on the new museum floor in the room where the exhibit is located to ascertain the popularity of the exhibit. What level of evaluation is this? B. Rod goes through training on controlling...
Please type or submit a PDF document so that I am able to legibly understand the...
Please type or submit a PDF document so that I am able to legibly understand the answer. ( This is ome question 2. In the case study below you will explore the causes of B12 deficiency in three patients. A. Patient A is a college student who has become increasingly tired over the last six months. She thought it was because of her tough schedule but since she noticed tingling in her feet, she thought she should see a doctor....
Please answer all: Give a short summary explaining each type of real option: Investment timing option...
Please answer all: Give a short summary explaining each type of real option: Investment timing option Growth option Abandonment option Flexibility option Describe a real life example of each type of real option: Investment timing option Growth option Abandonment option Flexibility option
Describe the formation of sales and lease contracts. Please answer by type-in text.
Describe the formation of sales and lease contracts. Please answer by type-in text.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT