Levels Tought:
Elementary,Middle School,High School,College,University,PHD
Teaching Since: | Jul 2017 |
Last Sign in: | 272 Weeks Ago |
Questions Answered: | 1850 |
Tutorials Posted: | 1850 |
Graduate in Biology and Nutrition, MBA Finance
Florida State University
Aug-2000 - Jul-2007
Ass. Relationship Manager
Penn-Florida
Mar-2009 - Feb-2016
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);
}
}
Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â----------- -----------Tha-----------nk -----------you----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------.Pl-----------eas-----------e p-----------ing----------- me----------- on----------- ch-----------at -----------I a-----------m Â----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I