Assignment title: Management


Write a java program called Code that, firstly, prompts (asks) the user to enter an input file name. This is the name of a text file that can contain any number of records (lines). A record in this file is a single line of text in the following format: Stop name^Route^Stop number where: Stop name is the name of a ferry stop. This may be more than one word and is followed by a '^' character, there are no spaces between the '^' and the Route. The stop name is case insensitive, that is Rose Bay and roSE BaY should produce the same result. Route is 2 characters in length and always starts with the character 'F' followed by a digit which will be between 1 and 7. Again, the route is followed by the '^' character and there are no spaces before or after the '^' character. Stop number is the stop number, and is an integer of one or two digits. The outer start points of the routes are considered to be stop 0. An example of some of the lines of this file might be: Chiswick^F3^7 Huntleys Point^F3^8 Taronga Zoo^F2^0 The input file may have 0 to any number of records. The format of the input file is guaranteed to be correct. Your program does not have to check the format. Also, your program must work with any file name of the correct format. (Do not hard code the file name.) Once this file has been opened, the user is then prompted for a stop name. The program then reads through the file. If a matching stop name is found in the file, all the information for that stop is displayed to the screen. The order of display is shown in the example runs below. There will usually be only one matching stop name in the file, once that stop name is found and information has been displayed to the screen in the correct format, then the program closes. In the cases where a stop name is in the file more than once, it is the first match that is found that is displayed. If the entire contents of the file has been read and no match is found, then an appropriate message is displayed to the screen