Question: I need code of this whole assignment. PLEASE don t explain in the answer how to do it . Just complete the code for me
I need code of this whole assignment. PLEASE dont explain in the answer how to do it Just complete the code for me
The program, airlineproject.java, has been started for you and included with this assignment. The assignment will also use the data file, flights.txt which is also included with this assignment.
Flight number, Flight origination city, Flight destination city, Flight date, Flight time, Number of coach seats on flight, Cost of each coach seat, Number of first class seats on flight, Additional cost of first class seats
methods as follows:
startprogram This method will open the data file flights.txt and read flight information into a set of parallel arrays. ALL WORK required in other sections of the code is then performed on the parallel arrays. You will ONLY refer to the flights.txt data file in this startprogram method. printallinfo This method will print all information that was read into the flight arrays
printspecificflightinfo This method will print all information on a specific flight. You will have to prompt the user for the flight number and search the arrays for the flight.
printdestination This method will print all information on all flights going to a specific city. You will have to prompt the user for the destination city and search the arrays for the destination city
printtotalseats For each flight, this method will print the flight number and the destination of the flight along with the total number of seats on the flight coach first class seats
printseatvalue For each flight, this method will print all information on the flight and calculate the value of the coach seats number of coach seats multiplied by the cost of the coach seats and the value of all the first class seats on the flight. A cost of one first class seat is the cost of the coach seat plus the additional cost that was read in
airlineproject.java Code :
package airlineproject;
import java.ioBufferedReader;
import java.ioFile;
import java.ioFileReader;
import java.ioIOException;
import java.util.StringTokenizer;
import javax.swing.JOptionPane;
public class airlineproject
public static void mainString args
int selection;
startprogram;
selectionMenu;
while selection
ifselection
printallinfo;
else
if selection
printspecificflightinfo;
else
ifselection
printdestination;
else
ifselection
printtotalseats;
else
ifselection
printseatvalue;
selectionMenu;
end of while loop
System.exit;
public static void startprogram
System.out.println
"Executing startprogram";
public static int Menu
int selection;
String value;
String words "Acme Airlines"
All flight Info"
Specific Flight Info"
Flights to specific Destination"
Total Seats on Flights"
Value of seats on all flights"
Exit"
Please make your selection ;
valueJOptionPane.showInputDialognull words, "Input Data", JOptionPane.QUESTIONMESSAGE;
selectionInteger.parseIntvalue;
return selection;
public static void printallinfo
System.out.println
"Executing printallinfo";
public static void printspecificflightinfo
System.out.println
"Executing printspecificflightinfo";
public static void printdestination
System.out.println
"Executing printdestination";
public static void printtotalseats
System.out.println
"Executing printtotalseats";
public static void printseatvalue
System.out.println
"Executing printseatvalue";
Contents of the flights.txt data file:
#Pittsburgh#Phoenix##:am#####
#Boston#New York##:am#####
#Pittsburgh#Seattle##:pm#####
#Chicago#Pittsburgh##:pm#####
#Pittsburgh#Miami##:am#####
#Las Vegas#New York##:pm#####
#Pittsburgh#San Francisco##:pm#####
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
