Question: 1. design the logic deciding whether to use AND or OR logic. write the decision statement to identify when a discount should be offered and

1. design the logic deciding whether to use AND or OR logic. write the decision statement to identify when a discount should be offered and when a disocunt should not be offered.

2. be sure to include output statemens telling whether or not the customer is eligible for a discount.

3. compile and execute

// Airline.java - This program determines if an airline passenger is // eligible for a 25% discount.

import javax.swing.*;

public class Airline { public static void main(String args[]) { String passengerName = ""; // Passenger's name. String ageString = ""; // String version of passenger's age. int passengerAge = 0; // Passenger's age.

// This is the work done in the housekeeping() method passengerName = JOptionPane.showInputDialog("Enter passenger's name: "); ageString = JOptionPane.showInputDialog("Enter passenger's age: "); passengerAge = Integer.parseInt(ageString); // This is the work done in the detailLoop() method // Test to see if this customer is eligible for a 25% discount.

// This is the work done in the endOfJob() method System.exit(0); }

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!