Write a program that will calculate the shipping charge for


Write a program that will calculate the shipping charge for a package, based on its weight. You will prompt (either use the Scanner class or JOptionPane) the user to enter the name of the customer, the package ID, and the weight of the package . Display the customer's name, the package id, the weight (in ounces) and the shipping charge ($2.00 / pound) each on separate lines. Line up the answers vertically using the correct escape characters.

example:
Name: Ross Paz
Package ID: 123456
Weight: 17 oz.
Shipping Costs: 2.04
I already have the following:
package shipping_cost_for_package;

public class shipping_cost_for_package
{

public static void main(String[] args)
{
// TODO Auto-generated method stub
final double oz_per_lb= 16;
double oz=17;
double lbs = (oz/oz_per_lb);
final double price_per_lb =2;
double price = (lbs * price_per_lb);
System.out.println("Name:Customer Name");
System.out.println("Package ID:123456");
System.out.println("Weight: " + oz + " oz");
System.out.println("Shipping Cost" + price);

}

}

Solution Preview :

Prepared by a verified Expert
JAVA Programming: Write a program that will calculate the shipping charge for
Reference No:- TGS02398255

Now Priced at $10 (50% Discount)

Recommended (93%)

Rated (4.5/5)