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.

  • IN C++ PROGRAMMING (We use #include <iostream> and cout and cin) Shipping Calculator Speedy Shipping Company...

    IN C++ PROGRAMMING (We use #include <iostream> and cout and cin) Shipping Calculator Speedy Shipping Company will ship your package based on the weight and how far you are sending the package, which can be anywhere in the world. They will only ship small packages up to 10 pounds. You need to have a program, which will help you determine how much they will charge. The charges are based on each 500 miles shipped. The mileage should be in whole...

  • 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...

  • Global Courier Services will ship your package based on how much it weighs and how far...

    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, i.e., 600 miles is the same rate as 900 miles or 1000 miles. Here are the shipping charges - Package Weight                                                                                Rate...

  • 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...

  • C programming only (Original work only as well, I will get into trouble if it is...

    C programming only (Original work only as well, I will get into trouble if it is a copy) also please add comments if it is not too much trouble. Program 5: Shipping Calculator The Speedy Shipping Company will ship packages based on how much they weigh and how far they are being sent. They will only ship small packages up to 10 pounds. You have been tasked with writing a program that will help Speedy Shipping determine how much to...

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