Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please write the following java code following the following parameters. Your task in this assignment is to implement three sorting methods of your choice to

image text in transcribedPlease write the following java code following the following parameters.
Your task in this assignment is to implement three sorting methods of your choice to sort the women's names in the file names.dat. The binary file has a list of names that your program is to sort and display in ascending alphabetical order. You are to also implement the binary search algorithm and allow the user to search for a particular name in the list. . The file accompanying the problem is a binary file. Make sure you create a method to open the file correctly You can use a sample names.txt to get you started but make sure you are able to open a binary file before you turn it in. I will be grading the assignments using a binary file. (15 pts) You are to read the contents of the binary file into either a string array or an ArrayList.I you are using an array, you will have to determine the size of the list to create the correct array (10 pts) Your program should be able to sort out the names in the file using two algorithms. For example: make a method to perform selection sort and another method to perform insertion sort and bubble sort. You choose which sorting algorithm will be used for the binary search but I need to see three sorting algorithms implemented in your program. (30 pts) . Your program should then allow users to input a name and get the index of where the name is found in the file. For example: if the user types in Mary into the search dialog box, then they should get a message indicating "The name Mary was found at index 1". (15 pts) e Use binary search algorithm to conduct the search. (15 pts) Use of dialog boxes is encouraged for a nicer looking user interface (UI). (10 pts) The package name should be names. (5 pts)

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_2

Step: 3

blur-text-image_3

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

Database Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

More Books

Students also viewed these Databases questions

Question

What is meant by a 'contingency theory' of management accounting?

Answered: 1 week ago