Question: Java program help. You are to write a Java program that has at least three functions: main, bubSort, and binSearch. main will be the entry

Java program help.

Java program help. You are to write a Java program that has

You are to write a Java program that has at least three functions: main, bubSort, and binSearch. main will be the entry point/driver, bubSort will be called to perform a bubble sort, and binSearch will be called to perform binary searches. Your program should input two separate data files. Both contain text strings. Neither file will be excessively large. You should not modify the files themselves. You will be able to view and become familiar with the files, but you should still write a general program. You should not write your program to work with these files, specifically. Your program should work properly for files containing any number of strings up to 50 The first file, InputFile1, will contain alphanumeric strings of varying lengths. You should input the file and sort it with a bubble sort. The second file, InputFile2, will also contain alphanumeric strings of varying lengths. You should input this file and use binSearch to determine if each of the InputFile2 strings is in the sorted InputFile1. In both your sort and search functions you will need to compare two strings repeatedly to implement the algorithms. Comparing two strings with relational operators, !, etc.) is permitted in Java and will not result in a compilation error. However, it is probably not the operation you want. Also, when searching with your binary search function you will need to determine greater than, less than and equality. You should study the functions of the String class to find why using the relational operators is not correct and to determine how to correctly compare two strings You should print a clearly labeled, formatted report of your results. Submit your work as a jar file through Canvas as detailed in the Lab Submission Guidelines document. Email submissions will not be accepted. Your .jar file should be executable. Your .jar file should contain your source code. If your source code is recompiled, it should produce a.class file identical to the class file in your .jar Your jar file should also contain both data files with file names identical to the file names above. All internal references to the files in your program should be the file names only. Do not include the full path

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!