Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

im having a problem infinsihing the last half of this program. can someone pleas

ID: 3667244 • Letter: I

Question

im having a problem infinsihing the last half of this program. can someone please help me beginning at

else if(classType.equalsIgnoreCase("E"))

here is the complete file

import java.util. Scanner public class AirplaneMenu { public void run() { boolean quit = false; String runAns = ""; Scanner input = new Scanner(System.in); while(!quit) { System.out.println("A)dd S)how Q)uit"); runAns = input.nextLine(); if(runAns.equalsIgnoreCase("A")) { add(); } else if(runAns.equalsIgnoreCase("S")) { show(); } else if(runAns.equalsIgnoreCase("Q")) { quit = true; } } } public void add() { Scanner input = new Scanner(System.in); System.out.println("F)irst E)conomy"); String classType = input.nextLine(); if(classType.equalsIgnoreCase("F")) { System.out.println("Passengers? (1-2)"); String people = input.nextLine(); if(people.equalsIgnoreCase("1")) { System.out.println("A)isle W)indow"); String position = input.nextLine(); if(position.equalsIgnoreCase("A")) } } else if(classType.equalsIgnoreCase("E")) { } } public void show() }

Explanation / Answer

private void getData() throws InvalidEmployeeTypeException{ System.out.println("Enter filename: "); Scanner prompt = new Scanner(System.in); inp = prompt.nextLine(); File inFile = new File(inp); try { input = new Scanner(inFile); } catch (FileNotFoundException ex) { ex.printStackTrace(); System.exit(1); } String type, name; int year, salary, hours; double wage; Employee e = null; while(input.hasNext()) { try{ type = input.next(); name = input.next(); year = input.nextInt(); if (type.equalsIgnoreCase("manager") || type.equalsIgnoreCase("staff")) { salary = input.nextInt(); if (type.equalsIgnoreCase("manager")) { e = new Manager(name, year, salary); } else { e = new Staff(name, year, salary); } } else if (type.equalsIgnoreCase("fulltime") || type.equalsIgnoreCase("parttime")) { hours = input.nextInt(); wage = input.nextDouble(); if (type.equalsIgnoreCase("fulltime")) { e = new FullTime(name, year, hours, wage); } else { e = new PartTime(name, year, hours, wage); } } else { throw new InvalidEmployeeTypeException(); input.nextLine(); continue; } } catch(InputMismatchException ex) { System.out.println("** Error: Invalid input **"); input.nextLine(); continue; } //catch(InvalidEmployeeTypeException ex) //{ //} employees.add(e); } }