Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I NEED HELP ASAP!! Changes in the economy have determined that for the EZ shippi

ID: 3848252 • Letter: I

Question

I NEED HELP ASAP!!

Changes in the economy have determined that for the EZ shipping company, a surcharge will be assessed on all packages that meet certain criteria. The surcharge is a function of the characteristics of the package and the zip code to which it is sent.

1. The regular charges for shipping are calculated as follows:

     For all weights five pounds and under, the shipping cost is $12.00.

     For weights over five pounds, the charge is calculated as follows:
                        If length * width * height + weight is:

greater than 5 and less than or equal to 15, the shipping cost is 14.00

greater than 15 and less than or equal to 34, the shipping cost is 17.00

greater than 34 and less than or equal to 45, the shipping cost is 21.00

greater than 45 and less than or equal to 60, the shipping cost is 33.00

greater than 60, the shipping cost is 105.00

2. The additional charges are calculated as follows:

            If the first digit of the zip code is a "4" then there is an additional surcharge of 5% on

the shipping cost.

If the first digit of the zip code is a "6" then there is an additional surcharge of 9% on

the shipping cost.

For all other zip codes there is an additional surcharge of 14% on the shipping cost.

3. Finally, if the zip code is even, then there is an additional surcharge of 2% of the shipping

            cost.

Write a program that allows the user to input (in this order) the zip code, weight, length, width and height of the package then prints out the following:

The zip code and dimensions of the package

The shipping cost

The surcharge

The total shipping cost (shipping cost plus surcharge(s))

This program should be well documented (comments for the programmer and user) both internally and externally. For this program, you will need to use Dialog and Message Boxes, and continue to use them for all programs from this point on.

I am using the program, jGRASP, to complete this assignment, NOT VBA. Just a reminder...I NEED this to use Dialog AND Message Boxes NOT the "println" command, thanks in advance!!!

Explanation / Answer

import java.util.*;

public class shippingCharges{

public static double dimLength=0, dimWidth=0, dimWeight=0;

public static Scanner stdIn = new Scanner(System.in);

public static void main(String[]args){

System.out.println("Enter the height of the package :");

stdIn = dimLenght.nextDouble();

System.out.println("/nEnter the Width of the package :");

stdIn = dimWidth.nextDouble();

System.out.println("/nEnter the Weight of the package :");

stdIn = dimWeight.nextDouble();

}

public static double calcShipping(double charge, double len, double wdth, double wght){

charge = (len*wdth)+wght;

return charge;

}

}