Calculate the shipping charge for a package

Assignment Help JAVA Programming
Reference no: EM131602713

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);

}

}

Reference no: EM131602713

Questions Cloud

Define vertical tangent and horizontal tangent : A curve that has two horizontal tangents at the same xvalue, but no vertical tangents.
What are some techniques to evaluate potential sampling bias : What issues should be considered when constructing surveys? What are the implications of double-barreled, loaded, and negative questions?
Estimates economic damages for clients : Shaughnessy Consulting, LLC currently enjoys a patent on software that estimates economic damages for clients involved in personal injury lawsuits.
What kind of information can human services workers : What kind of information can human services workers provide to the community that could help increase access to services
Calculate the shipping charge for a package : Write a program that will calculate the shipping charge for a package, based on its weight - Line up the answers vertically using the correct escape characters
Create a constructor function for a book object : Create a constructor function for a Book object. The Book object should have-Create a constructor function for an object called Author
What factors will shift the supply and demand for currency : What will happen to a country that fixes the price of foreign exchange below equilibrium? What factors will shift the supply and demand for currency?
What challenges you anticipate in getting your organization : What challenges you anticipate in getting organization to implement and utilize business analytics? What would be some challenges in using business analytics?
Find the rate of change of volume with pressure : Show that the power rule for derivatives applies to rational powers of the form y = xm/n by raising both sides to the nth power and using implicit.

Reviews

Write a Review

JAVA Programming Questions & Answers

  Recursive factorial program

Write a class Array that encapsulates an array and provides bounds-checked access. Create a recursive factorial program that prompts the user for an integer N and writes out a series of equations representing the calculation of N!.

  Hunt the wumpus game

Reprot on Hunt the Wumpus Game has Source Code listing, screen captures and UML design here and also, may include Javadoc source here.

  Create a gui interface

Create GUI Interface in java programing with these function: Sort by last name and print all employees info, Sort by job title and print all employees info, Sort by weekly salary and print all employees info, search by job title and print that emp..

  Plot pois on a graph

Write a JAVA program that would get the locations of all the POIs from the file and plot them on a map.

  Write a university grading system in java

University grading system maintains number of tables to store, retrieve and manipulate student marks. Write a JAVA program that would simulate a number of cars.

  Wolves and sheep: design a game

This project is designed a game in java. you choose whether you'd like to write a wolf or a sheep agent. Then, you are assigned to either a "sheep" or a "wolf" team.

  Build a graphical user interface for displaying the image

Build a graphical user interface for displaying the image groups (= cluster) in JMJRST. Design and implement using a Swing interface.

  Determine the day of the week for new year''s day

This assignment contains a java project. Project evaluates the day of the week for New Year's Day.

  Write a java windowed application

Write a Java windowed application to do online quiz on general knowledge and the application also displays the quiz result.

  Input pairs of natural numbers

Java program to input pairs of natural numbers.

  Create classes implement java interface

Interface that contains a generic type. Create two classes that implement this interface.

  Java class, array, link list , generic class

These 14 questions covers java class, Array, link list , generic class.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd