import java.util.*;
import java.io.*;
public class Aman
{
public static void main(String[] args)
{
// Variables for holding order amount and valued customer data to be
// entered by the user
// Variables for holding information about free shipping
boolean isFree;
// Prompt for and read order amount and valued customer data
System.out.print(“Order amount (floating-point): “);
Scanner Keyboard= new Scanner(System.in);
double amount;
amount =Keyboard.nextDouble();
System.out.print(“Valued customer? (Y)es or (N)o: “);
Char valuedCust;
valuedCust = Keyboard.nextChar();
// Determine and display information about free shipping.
// Shipping is free if the order amount is greater than or equal $100
// AND the customer is a valued customer.
isFree = (amount >= 100 && (valuedCust == ‘Y’ || valuedCust == ‘y’));
System.out.println(” Free shipping? ” + isFree);
}
} |