Question

This program should calculate package shipping costs The shipping company has mn toning discount percentages Shipping Costs Discount $200 or less 1.9% $200.01 to $500 2.4% $500.01 to $1000 2.8% $1000.01 or more 3.3%


media%2Fcb6%2Fcb63ee57-4196-4285-a93c-0a

The programs should be in C++

0 0
Add a comment Improve this question Transcribed image text
Answer #1

void calculate_shipping_cost(float cost)
{
    float shipping_cost;

    if (cost <= 200)
       shipping_cost = cost - 0.019 * cost;
    if (cost > = 200.01 && cost <= 500)
       shipping_cost = cost - 0.024 * cost;
    if (cost > 500.01 && cost <= 1000)
       shipping_cost = cost - 0.028 * cost;
    if (cost >= 1000.01)
       shipping_cost = cost - 0.033 * cost;

       cout << "Shipping Cost:" << "$" << shipping_cost;
}

void calculate_phones_cost(int num_phones, int num_cases)
{
    float cost;

    cost = num_phones * 699.99 + num_cases * 24.99;
    cout << "Total Cost :" << '$' << cost << endl;
    cout << "Total Cost with optional overnight delivery:" << '$' << cost + 25.00 << endl;
    cout << "Total Cost with optional overnight delivery and optional insurance:" << '$' << cost + 25.00 + 0.11 * cost
         << endl;

}

void calculate_hotdogs_cost(int num_hotdogs)
{
    float cost;

    cost = num_hotdogs * 5.99;
    cout << "Total Cost :" << '$' << cost << endl;
    cout << "Total Cost with condiments:" << '$' << cost + num_hotdogs * 0.79 << endl;
    cout << "Total Cost with condiments and ordering:" << '$' << cost + num_hotdogs * 0.79 + 1.29 * num_hotdogs << endl;
    cout << "Total Cost with condiments, ordering and optional overnight delivery:" << '$' << cost + num_hotdogs * 0.79
              + 1.29 * num_hotdogs + 9.00 << endl;
    cout << "Total Cost with condiments, ordering, optional overnight delivery and optional insurance:" << '$' << cost +              num_hotdogs * 0.79 + 1.29 * num_hotdogs + 9.00 + 0.03 * cost << endl;


}

Add a comment
Know the answer?
Add Answer to:
The programs should be in C++ This program should calculate package shipping costs The shipping company...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Can someone complete this program for me in c programming language? Thank you! The Send-Ex Shipping...

    Can someone complete this program for me in c programming language? Thank you! The Send-Ex Shipping Company charges the following rates: Weight of Package 2 lbs or less Over 2 lbs but no more than 6 lbs Over 6 lbs but no more than 10 lbs Over 10 lbs Rate per Pound $1.10 $2.20 $3.70 $4.10 Write a program that asks the user to enter the weight of a package and then displays the total shipping charge. Reserve Point Opportunity/...

  • In this assignment, you will develop a C++ program which calculates a shipping charge and determines...

    In this assignment, you will develop a C++ program which calculates a shipping charge and determines the “type of trip” for a freight shipping company. Ask the user to enter the distance a package is to be shipped, and use a menu and a switch statement to determine the rate based on the package’s weight. Then display the shipping charge and using the table in #7 below, display the type of trip. Below is the chart to use to calculate...

  • The Fast Freight Shipping Company charges the following rates: Weight of Package Rate per Pound 2...

    The Fast Freight Shipping Company charges the following rates: Weight of Package Rate per Pound 2 pounds or less $1.50 Over 2 pounds but not more than 6 pounds $3.00 Over 6 pounds but not more than 10 pounds $4.00 Over 10 pounds $4.75 Write a program that asks the user to enter the weight of a package then displays the shipping charges.

  • Python Language 3. Shipping Charges The Fast Freight Shipping Company charges the following rates (per 500...

    Python Language 3. Shipping Charges The Fast Freight Shipping Company charges the following rates (per 500 miles shipped): 1. Number Guessing Game Write a program for players to guess the number that the program randomly generated. Your program should randomly generate an integer between 1 and 10. After a player guessing a number, your program should display "Too small", "Too large", or "That's it!". Weight of Package (in Kilograms) 2 kg or less Over 2 kg but not more than...

  • NOTE: All C++ programs that you write must have comments at the top with the program...

    NOTE: All C++ programs that you write must have comments at the top with the program name, your name, and the pseudocode describing what the program will do. 1. Create a new program that will calculate the total cost for software purchased from a store. Each software package costs $99.00, but discounts are given on the total cost, based on the number of packages purchased. a. Ask the user for the number of packages they want to buy b. Calculate...

  • C++ IMPORTANT: Write a driver program (PackageDriver) that creates objects of each type of Package as...

    C++ IMPORTANT: Write a driver program (PackageDriver) that creates objects of each type of Package as pointers to a Package and cout the objects. Write a driver program (PackageDriver) that creates objects of each type of Package as pointers to a Package and cout the objects. Write a driver program (PackageDriver) that creates objects of each type of Package as pointers to a Package and cout the objects. Package-delivery services, such as FedEx®, DHL® and UPS®, offer a number of...

  • PSLAYER 09/27/2017 yo October 9,2017 Graduation st Monday at T2:43 AM Shipping Calculator: Global Courier Services...

    PSLAYER 09/27/2017 yo October 9,2017 Graduation st Monday at T2:43 AM Shipping Calculator: Global Courier Services will ship your package based on how much it weighs and how far you are sending the package. Packages above 50 pounds will not be shipped. You need to write a program in C that calculates the shipping charge The shipping rates are based on per 500 miles shipped. They are not pro-rated, ie, 600 miles is the same rate as 900 miles or...

  • In Python. Complete the following programs. Begin each program with a comment that includes: • Your...

    In Python. Complete the following programs. Begin each program with a comment that includes: • Your name • The project/program • Brief description of the problem Lab3Pro1 A supervisor in a manufacturing company wishes to display the bonus amount for an employee based on this year's production. Input Output Processing Distribute bonuses as follows: Display the results as follows: Prompt for user input "Enter number of Units produced" Store the amount entered Bonus This year's production bonus will be $nnnnn...

  • Write a C++ program that will calculate the total amount of money for book sales at...

    Write a C++ program that will calculate the total amount of money for book sales at an online store. For each sale, your program should ask the number of books sold and then the price for each book and the shipping method (‘S’ for standard shipping and ‘E’ for expedited shipping). The program will produce a bill showing the subtotal, the sales tax, the discount, the shipping charge, and the final total for the sale. The program will continue processing...

  • My program works fine with if else conditions but when it is not working when I...

    My program works fine with if else conditions but when it is not working when I try to implement it using a for loop. Can you fix my for loop and please show me how to do this using loops? I would appreciate if you could explain the loop that you are using. /* Programming Challenge: Shipping Charges The Fast Freight Shipping Company charges the following rates: Weight of Package (in Kilograms) Rate per 500 Miles Shipped 2 kg or...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT