Checkpoint 1.13.1.
The
shippingMessage()
function takes two double inputs and one boolean input and prints some messages. Complete the function by filling in the blanks so that it prints "We can ship it!" only when all the following conditions are met; otherwise, it prints "Cannot be shipped!".- The item is not fragile (isNotFragile is true).
- The weight is less than 50.
- The length is less than 150.
public static void shippingMessage(boolean isNotFragile, double weight, double length) {
if (...........Blank 1..............) {
System.out.println("We can ship it!");
}
else {
System.out.println("Cannot be shipped.");
}
}
Write your responses here:
Blank 1: