Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need help with this in Java. Write a program that will calculate the shipping charge for a company. The following table shows the shipping

I need help with this in Java.

Write a program that will calculate the shipping charge for a company. The following table shows the shipping rates for the company:

Weight of Package (in lb) | Rate per 200 miles shipped

Less than 5 lb | $1.10

Between 5 lb and 9 lb | $2.50

Between 10 lb and 50 lb | $4.90

More than 50 lb | $7.50

The shipping charges per 200 miles are not prorated. For example, if a 5 lb package is shipped 250 miles, the charges would still be $2.50.

Here is what you need to do:

1. Ask the user to enter the weight of the package.

2. Ask the user to enter the number of miles the package will be shipped.

3. Calculate the shipping cost and show it in the screen.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

What about leadership lessons from particularly good or bad bosses?

Answered: 1 week ago