Question: Making Multiple Comparisons in Decision Statements in Java Q Sear Making Multiple Airline java Comparisons in Decision Statements 1 /1 Atrline. java - Thts progran

 Making Multiple Comparisons in Decision Statements in Java Q Sear Making
Multiple Airline java Comparisons in Decision Statements 1 /1 Atrline. java -
Thts progran deterntnes tf an atrline passenger 2! // eligible for a
25% discount. 4 inport java. util.Scanner; 6 public class Atrltne 8 public

Making Multiple Comparisons in Decision Statements in Java Q Sear Making Multiple Airline java Comparisons in Decision Statements 1 /1 Atrline. java - Thts progran deterntnes tf an atrline passenger 2! // eligible for a 25% discount. 4 inport java. util.Scanner; 6 public class Atrltne 8 public static void nain(String args[1) Summary In this lab, you complete a partially written Java program for an airline that offers a 25 percent discount to passengers who are 6 years old or younger and the same discount to passengers who are 65 years old or older. The program should request a passenger's name and age and then print whether the passenger is eligible or not eligible for a discount. Scanner s new Scanner (Systen. in): String passengerNane ; I Passenger's nane String ageString 12 // String verston of , passenger s age // Thts ts the vork done in the housekeeptng() nethod Systen.out. println(" Enter passenger's nane). passengerNane s.nextl tneO Systen.out.println Enter passenger's age: "). ageString #s.nextLine(); Instructions 1. Ensure the file named Airline.java is open. 2. Variables have been declared and DOLL

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!