Question

In: Computer Science

10. The cost of sending a package by an express delivery service is $16.00 for the...

10. The cost of sending a package by an express delivery service is $16.00 for the first two pounds, and $6.00 for each extra pound or a fraction of a pound. If the package weighs more than 80 pounds, a $25.00 excess weight surcharge is added to the cost. No package over 180 pounds will be accepted. Write a program that accepts the weight of a package in pounds and computes the cost of mailing the package with proper messaging. It should handle the excessive package with a suitable excusing message. Write the program with if-else statements. Add to your report snapshots of the results for each range.

Write in C++

Solutions

Expert Solution

C++ Program pasted below.

#include <iostream>
using namespace std;
int main()
{int weight,cost;
cout<<"Enter the weight of the parcel in pounds:";
cin>>weight;
if(weight<=2)
{
cost=16;
cout<<"Cost of the parcel:$"<<cost;
}
else if(weight>3 && weight<=80)
{
cost=16+(weight-2)*6;
cout<<"Cost of the parcel:$"<<cost;
}
else if(weight>80 && weight<=180)
{
cost=16+(weight-2)*6+25;
cout<<"Cost of the parcel:$"<<cost;
}
else
cout<<"Sorry, Your parcel weight should be less than 180 pounds";
  
return 0;
}

Output Screen Test case 1

Output Screen Test case 2

Output Screen Test case 3

Output Screen Test case 4


Related Solutions

In the early 2000’s, DHL expanded its worldwide air express package delivery service to the US...
In the early 2000’s, DHL expanded its worldwide air express package delivery service to the US market in direct competition with UPS and FedEx. After several years and more than one billion dollars in losses, DHL admitted defeat in 2008 withdrawing from most US markets while shedding some 15,000 US jobs. Think back to DHL announcement of its intention to enter the US market. Various stakeholders would greet the prospect of increased competition differently. In this discussion forum, address the...
Suppose that the weight of a package in a package delivery service is right-skewed with mean...
Suppose that the weight of a package in a package delivery service is right-skewed with mean 1 pound and standard deviation 0.5774 pounds. Its density curve is shown in the following graph. (a) If you randomly choose 64 packages, find the sampling distribution of their average weight. Please indicate the shape, mean and standard deviation. (b) For randomly selected 64 packages, find the probability that their average weight is above 1.02 pounds. Let X¯ be the average weight of randomly...
a package delivery service claims that 55% of all package arrive at the address late. Assuming...
a package delivery service claims that 55% of all package arrive at the address late. Assuming that conditions for binomial holds, if a sample size of 7 is randomly selected , what is the probability that at most 4 packages will arrive on time? what is the probability that at leadt one pavkage will arrive on time? what is the probability that exactly 4 packages will arrive on time?
Q3 A package service company offers overnight package delivery to its business cus- tomers. It has...
Q3 A package service company offers overnight package delivery to its business cus- tomers. It has recently decided to expand its facilities to better satisfy current and pro- jected demand. Current volume totals two million packages per week at a price of $12 each, and average variable costs are constant at all output levels. Fixed costs are $3 million per week, and profit contribution averages one-third of revenues on each delivery (profit contribution=(p–AV C)Q). After completion of the expansion project,...
Your express package delivery company is drawing up new zones for the location of drop boxes...
Your express package delivery company is drawing up new zones for the location of drop boxes for customers. The city has been divided into six zones. You have targeted seven possible locations for drop boxes. The list of which zones the drop boxes could serve is shown below Possible Drop Box Location Can serve Zones Location 1 2, 5, 6 Location 2 1, 3, 6 Location 3 2, 4, 5 Location 4 1, 2, 6 Location 5 3, 4, 5...
Express Delivery is a rapidly growing delivery service. Last year, 80% of its revenue came from...
Express Delivery is a rapidly growing delivery service. Last year, 80% of its revenue came from the delivery of mailing “pouches” and small, standardized delivery boxes (which provides a 20% contribution margin). The other 20% of its revenue came from delivering non-standardized boxes (which provides a 70% contribution margin). With the rapid growth of Internet retail sales, Express believes that there are great opportunities for growth in the delivery of non-standardized boxes. The company has fixed costs of $12,100,000. (a)...
A package delivery service wants to compare the proportion of on-time deliveries for two of its...
A package delivery service wants to compare the proportion of on-time deliveries for two of its major service areas. In City A, 358 out of a random sample of 447 deliveries were on time. A random sample of 320 deliveries in City B showed that 256 were on time. 1. Calculate the difference in the sample proportion for the delivery times in the two cities. p̂ CityA−p̂ CityB = _____? 2. What are the correct hypotheses for conducting a hypothesis...
A delivery service company in Kuala Lumpur guarantees a refund of all charges if a package...
A delivery service company in Kuala Lumpur guarantees a refund of all charges if a package it is delivering does not arrive at its destination by the specified time. It is known from past data that a proportion p of the packages mailed through this company does not arrive at its destination by the specified time. given,mean=0.0117 standard deviation=0.0034 n=1000 (iii) What is the sampling distribution of ? Justify your answer. (iv) There is a 95% chance that falls in...
A package delivery service wants to compare the proportion of on-time deliveries for two of its...
A package delivery service wants to compare the proportion of on-time deliveries for two of its major service areas. In City A, 314 out of a random sample of 378 deliveries were on time. A random sample of 280 deliveries in City B showed that 221 were on time. 1. Calculate the difference in the sample proportion for the delivery times in the two cities. ?̂?????−?̂???yB 2. What are the correct hypotheses for conducting a hypothesis test to determine whether...
A package delivery service wants to compare the proportion of on-time deliveries for two of its...
A package delivery service wants to compare the proportion of on-time deliveries for two of its major service areas. In City A, 377 out of a random sample of 449 deliveries were on time. A random sample of 282 deliveries in City B showed that 220 were on time. Compute a 99% confidence interval for the difference ?̂ ?????−?̂ ?????
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT