Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Management System MCQs Multiple Choice Questions And Answers

Authors: Arshad Iqbal

1st Edition

1073328554, 978-1073328550

More Books

Students also viewed these Databases questions

Question

Find the convergence set for each series? (a) (b) i n.2" (2x 3)" r2

Answered: 1 week ago