Advertisement
Guest User

randomBinarySearch

a guest
May 22nd, 2019
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. /*
  2. * random access binary file recursive binary search
  3. * This program demonstrates the recursiv
  4. * binary search method applied to random access binary file.
  5. *
  6. * Project 2 cs111
  7. */
  8. // imports
  9. /**
  10. *
  11. * author
  12. * date
  13. *
  14. */
  15. public class RandomAccessBinaryFileRecursiveBinarySearch {
  16. public static void main(String[] args)
  17. throws FileNotFoundException, IOException {
  18. // The value to search for
  19. // Create a Scanner object for keyboard input.
  20. // file BinFileShort
  21. // open for reading RandomAccessFile file
  22. // create file object fileArray
  23. // loop over multiple reads until sentinal value is read
  24. // Get a value to search for.
  25. // Search for the value
  26. // Display the results.
  27. // searchValue + " was not found
  28. // searchValue was found at element: result
  29. // search until sentinal value is read
  30. }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement