Question: Code Given: //TODO: document this class public class PA1d { /** * Error message to display for negative amount */ public static final String ERR_MSG

Code Given:
//TODO: document this class public class PA1d { /** * Error message to display for negative amount */ public static final String ERR_MSG = "The package cannot be shipped!"; /** * Method to compute shipping cost * * @param weight, assumed to be in (0, 20] * @return cost to ship */ public static double shippingCost(double weight) { return 0.0; // TODO: replace with your method implementation }
// TODO: document this method public static void main(String[] args) { // TODO: write your code here }
}
A shipping company uses the following function to calculate the cost (in dollars) of shipping based on the weight of the package (in pounds). $3.50 if 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
