Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a complete Java program that stores a sorted list of strings (for example, names) in a file. At program start up, read in any

image text in transcribed

Write a complete Java program that stores a sorted list of strings (for example, names) in a file. At program start up, read in any strings that are currently in your data file (on the first iteration of the program there will be none) and place them into an array or ArrayList (make sure to note which you have chosen and why). Provide a menu that allows the user to enter additional strings, determine whether a particular string is present in the list, and edit the strings in the list. At termination, the program should write the new sorted list back to your data file. At minimum, your program should: Declare an array or ArrayList of strings * Read in the current list of strings from a data file. . Allow the user to input data into the arrav/ArrayList. .Sort the string array/ArrayList using an efficient sorting algorithm. Do not use the built-in sort methods. Make sure to note (in comments, etc.) which algorithm you are using to sort the array/ArrayList, and why you have chosen it. Allow the user to search for a string in the array/ArrayList. Use a binary search to locate the string in the array. Write the sorted array back to a file so that it can be used in the next program run

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions