3. (40 points) Write a function named as shippingcost that calculates the cost of shipping a...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
3. (40 points) Write a function named as shippingcost that calculates the cost of shipping a package according to the following price schedule: Type of Service Ground Express 0-1000 g 50 TL +0.03 TL/g 75 TL + 0.03 TL/g Weight 1000-1500 g 80 TL + 0.05 TL per every additional weight in g over 1000 g 105 TL + 0.05 TL per every additional weight in g over 1000 g Ground Express >1500 g 105 TL + 0.1 TL per every additional weight in g over 1500 g 130 TL + 0.1 TL per every additional weight in g over 1500 g MATLAB PLS Your program should involve switch/case and if/elseif structures and perform the following tasks: prompt the user to enter one of the following service types: prompt the user to enter the package weight calculate the shipping cost according to the price schedule given in the table provided that the service type has been entered correctly, reports the result using fprintf as follows: The cost of your shipment will be whatever_the_price_is' TL gives a warning message like 'Please enter a correct service type' when no or incorrect input is supplied by the user. 3. (40 points) Write a function named as shippingcost that calculates the cost of shipping a package according to the following price schedule: Type of Service Ground Express 0-1000 g 50 TL +0.03 TL/g 75 TL + 0.03 TL/g Weight 1000-1500 g 80 TL + 0.05 TL per every additional weight in g over 1000 g 105 TL + 0.05 TL per every additional weight in g over 1000 g Ground Express >1500 g 105 TL + 0.1 TL per every additional weight in g over 1500 g 130 TL + 0.1 TL per every additional weight in g over 1500 g MATLAB PLS Your program should involve switch/case and if/elseif structures and perform the following tasks: prompt the user to enter one of the following service types: prompt the user to enter the package weight calculate the shipping cost according to the price schedule given in the table provided that the service type has been entered correctly, reports the result using fprintf as follows: The cost of your shipment will be whatever_the_price_is' TL gives a warning message like 'Please enter a correct service type' when no or incorrect input is supplied by the user.
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
The new line character is utilized solely as the last person in each message. On association with the server, a client can possibly (I) question the situation with a client by sending the client's...
-
Write a program in a script file that calculates the cost of shipping a package according to the following price schedule: The program asks the user to enter the type of service (Ground, Express, or...
-
1. Determine and confirm purchasing requirements for at least six (6) of the goods listed in the knowledge evidence. 2.Make purchase arrangements for the goods to meet different: End product...
-
What is a correlation?
-
Refer to Figure 9.1, where a 2.0 m 3.0 m flexible foundation is placed in a saturated clay at 1.5 m depth. Bedrock lies at 4.0 m below the foundation. The clay is overconsolidated with OCR = 2,...
-
Water flows past a triangular flat plate oriented parallel to the free stream as shown in Fig. P9.50. Integrate the wall shear stress over the plate to determine the friction drag on one side of the...
-
Multiple Choice Questions Select the best answer for each of the following questions. Explain the reasons for your selection: a. In an integrated audit, which of the following must the auditors...
-
Coronado, Inc., manufactures clamps used in the overhead bin latches of several leading airplane models. Brian Lee, president of Coronado, Inc., has gathered the following cost information from the...
-
What method is being used when someone attempts to measure inflation expectations by going door-to-door asking people questions on what they expect and by sending out fliers for people to fill out?
-
Rustafson Corporation is a diversified manufacturer of consumer goods. The company's activity-based costing system has the following seven activity cost pools: Activity Cost Pool Labor-related...
-
The open-loop transfer function of a system is: X(s) 2s +3 R(s) s +25 + 7s +9 Find the transfer function of the closed loop system with a unity feedback Problem 3 Find the open-loop and closed-loop...
-
Consider the market for copper, where demand is given by the equation P(QD) = 500 - 1/2Q and market supply is given by P(Qs) = 50 Q. The discount rate is r=10% and there is a fixed supply of 400...
-
While preparing for their golden years in Florida, your parents have been saving $15000 annually for the past 20 years, invesng it into a rerement fund. This fund provided a yearly return of 5.0%...
-
The supply of a measles vaccine is given by S = 2P. The demand for the same vaccine is given by D = 50 - 3P. a) Absent any intervention, what are the equilibrium price and quantity of the vaccine? b)...
-
Jane quit her job at IBM where she earned $380,000 a year She cashed in$150,000 in corporate bonds that earned 10 interest annually to hug, I a minibus Jane has decided to hugr the minibus and set up...
-
What does non-recourse financing mean?
-
Molecules of a gas in a container are moving around at different speeds. Maxwell's speed distribution law gives the probability distribution P(v) as a function of temperature and speed: where M is...
-
Create two row vectors: a = 2 : 3 : 17 and b = 3 : 4 : 15. Then, by only using the name of the vectors (a and b), create a row vector c that is made from the elements of a followed by the elements of...
-
A paper cup shaped as a frustum of a cone with R2 = 2R1 is designed to have a volume of 250 cm3. Determine R1, R2, and h such that the least amount of paper will be used for making the cup. The...
-
Following is a list of information for Peter and Amy Jones for the current tax year. Peter and Amy are married and have three children, Aubrynne, Bryson, and Caden. They live at 100 Main Street,...
-
Kelly and Chanelle Chambers, ages 47 and 45, are married and live at 584 Thoreau Drive, Boston, MA 59483. Kellys Social Security number is 111-11-1111 and Chanelles is 222-22-2222. The Chambers have...
-
The amplitude of a surface wave for which \(\lambda=0.050 \mathrm{~m}\) is \(5.0 \mathrm{~mm}\) at a distance of \(1.0 \mathrm{~m}\) from a point source. What is the amplitude of the wave (a) 10 m...
Study smarter with the SolutionInn App