Question: For JAVA please! Do not use for statements, arrays, or anything more complex than if statements, switch statements, and math computations for the following problem.

For JAVA please!

Do not use for statements, arrays, or anything more complex than if statements, switch statements, and math computations for the following problem. Thank you in advance!

A company charges by weight for delivery of packages. The first pound to deliver costs 3 dollars, and 50 cents are added to the price for each extra four ounces. (One pound equals 16 ounces.) e.g A box that weighs more than 16 but no more than 20 ounces will cost 3.50 dollars to deliver, and a box that weighs more than 20 ounces, but no more than 24 will cost 4 dollars. and so on. Write a method that will compute the cost of the delivery using a double-valued method.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!