Alrighty. I'm new to Java.
I'm trying to write a program that begins by taking an optional command line argument, which is the name of a file.
The format of this file is a list of persons' names, one per line.
The program will read these names and store them in an array.
If no command line argument is given, the program will simply create an empty array, used to store names.
The program will then proceed to sort the list of names using selection sort (if the array is not empty). Finally, there will be a menu of options for the user to select from.
The first is to alphabetize the list.
Second, an option to find a particular name matching a keyword provided by the user. This should use "binary search". For example, the user could provide the keyword Davis, and if the list contains the name James Davis, the program will return this name. The program is required to return only the first ocurrence found if there's more than one.
Third, the user could add a name to the list
Fourth, terminate the program
I'm using Eclipse, so if you could put the code in terms of Eclipse, that would be great.
So far, I have a couple algorithms for binary search, selection sort, and a non-functional menu.
Re: Interactive Program
Did yhou have any java programming questions?