Question: Write a complete Java program to use Map to construct a dictionary for airport code and airport city. The program should read from a text
Write a complete Java program to use Map to construct a dictionary for airport code and airport city. The program should read from a text file (input.txt") to construct the dictionary and also all ow user to search for airport code based on airport city. Each line in the text file is a pair of airport code and city separated by a TAB key. Once the file is read and the dictionary is constructed, the program should ask user to enter an airport city and then search and display the code of corresponding airport(s) if found. The program will then decide whether to continue or not by asking user. For example, the user may type Chicago and it should return ORD The sample input file looks like this:
RDU Raleigh/Durham
SFO San Francisco
ORD Chicago
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
