The purpose of this assignment is to practice manipulating arrays. This assignment assesses your ability to: ▪Implement sequential and binary search algorithms for array structures. ▪Implement iterative sorting algorithms for array data. For this assignment, write a program that reads a text file and stores each word in an array. Write one of the iterative sorting algorithms to sort your data. Once the data is sorted, write a binary sort algorithm that, when given a string, returns either the index of the string or a -1 to indicate the string was not found in the array. Your program should allow the user to continually enter strings. An entry of 0 indicates the user is finished searching for strings. Start your program by reading strings from a file and populating a string array. Declare the array with a capacity for 10,000 strings. An input file is included with this assignment: ‘text.txt’. Next, write a method that implements either bubble sort, insertion sort, or selection sort. Write this implementation yourself without help from the Internet. Display the array before and after sorting it to ensure that the sort algorithm works properly. Remember, uppercase and lowercase letters affect the alphabetical ordering. Do not convert to all uppercase or all lowercase – just sort the words as they are presented. Finally, write a method that implements binary search on your sorted array. Allow the user to repeatedly enter words to search for. Display either the index of the word or a message that the word is not in the list. Before submitting your work, create a LOOM video in which you run your program and explain EXACTLY how your sort and search methods work. Focus on explaining WHY you coded your work the way you did. Refrain from reading your code; I can read code – what I want to know is whether or not you fully understand the work you have submitted. Your video should not exceed 4 minutes. Submit the following:

EBK JAVA PROGRAMMING
8th Edition
ISBN:9781305480537
Author:FARRELL
Publisher:FARRELL
Chapter16: Graphics
Section: Chapter Questions
Problem 1DE
icon
Related questions
Question

CST-201

Project 0: Array Warm-Up
The purpose of this assignment is to practice manipulating arrays. This assignment assesses your ability to:
▪Implement sequential and binary search algorithms for array structures.
▪Implement iterative sorting algorithms for array data.
For this assignment, write a program that reads a text file and stores each word in an array. Write one of the iterative sorting algorithms to sort your data. Once the data is sorted, write a binary sort algorithm that, when given a string, returns either the index of the string or a -1 to indicate the string was not found in the array. Your program should allow the user to continually enter strings. An entry of 0 indicates the user is finished searching for strings.
Start your program by reading strings from a file and populating a string array. Declare the array with a capacity for 10,000 strings. An input file is included with this assignment: ‘text.txt’.
Next, write a method that implements either bubble sort, insertion sort, or selection sort. Write this implementation yourself without help from the Internet. Display the array before and after sorting it to ensure that the sort algorithm works properly. Remember, uppercase and lowercase letters affect the alphabetical ordering. Do not convert to all uppercase or all lowercase – just sort the words as they are presented.
Finally, write a method that implements binary search on your sorted array. Allow the user to repeatedly enter words to search for. Display either the index of the word or a message that the word is not in the list.
Before submitting your work, create a LOOM video in which you run your program and explain EXACTLY how your sort and search methods work. Focus on explaining WHY you coded your work the way you did. Refrain from reading your code; I can read code – what I want to know is whether or not you fully understand the work you have submitted. Your video should not exceed 4 minutes.
Submit the following:
1.Your program. Submit ONLY the files that you coded. If you have more than one file, zip them up before submitting. If you have only one file, add .txt to the extension and submit.
2.A text file called video.txt that contains a link to your LOOM video.
ProjZero.java
text_short.txt
1 rest down from back that only take year door hand song blue
input file
123
Problems @ Javadoc Declaration Console X
<terminated > ProjZero [Java Application] C:\Program Files\Java\jre1.8.0_121\bin\javaw.exe (Jun 4, 2020, 8:33:10 AM)
Unsorted list...
rest down from back that
only take year door hand
song blue
After sorting...
back blue down from hand
door only rest song take
that year
Enter words to search for...enter Ø to quit.
rest
rest is in the list at index 7
test
test is not in the list
0
run for the input
shown above.
Goodbye
Transcribed Image Text:ProjZero.java text_short.txt 1 rest down from back that only take year door hand song blue input file 123 Problems @ Javadoc Declaration Console X <terminated > ProjZero [Java Application] C:\Program Files\Java\jre1.8.0_121\bin\javaw.exe (Jun 4, 2020, 8:33:10 AM) Unsorted list... rest down from back that only take year door hand song blue After sorting... back blue down from hand door only rest song take that year Enter words to search for...enter Ø to quit. rest rest is in the list at index 7 test test is not in the list 0 run for the input shown above. Goodbye
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 4 images

Blurred answer
Knowledge Booster
Quicksort
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT