Question: Please Solve using JAVA You will create a program which implements file 1/0, as well as several methods which perform specific array functions. Input: A

Please Solve using JAVA

Please Solve using JAVA You will create a program which implements file

You will create a program which implements file 1/0, as well as several methods which perform specific array functions. Input: A "database" formatted as shown below. The first line of the file will indicate how many entries there are in the file. Please code your program to accept "input.txt" as the input file. Sample input: 7 Twist Orlando A Peechatt Cicchetti F Notten L Guerrero Andrighetti E Your program will store these names in a sorted array. Offer the user a menu with the following options: 1. Add 2. Delete 3. Display 4. Write to File 5. Exit Add: This menu option prompts the user to enter a last name and first initial to add to the array. The array should be in alphabetical order after the name has been added. Delete: This menu option prompts the user to enter a last name to search for in the array. If the last name is not in the array, print the message "Name not found." If the last name is in the array, confirm the first initial with the user. If the first initial matches, delete the name from the array. The array should be in alphabetical order after the name has been subtracted. Display: Print the array. Write to File: Prompt the user for a filename. Write the contents of the array to the file, using the same format as the input file. OPTIONAL EXTRA CHALLENGE: Keep track of the file names the user has entered and refuse to write to a file if the filename entered has already been used. Exit: Write the contents of the array to a file labeled output.txt using the same format as the input file, and exit the program

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!