Programming and Problem Solving with Java

(やまだぃちぅ) #1

3.Create another applet exactly like the one in Exercise 2, but replace the linear
search with a binary search. Be sure to sort the values before you search.


4.The output from each applet should give the user enough information to deter-
mine which search algorithm is being used. After the user runs the applet for a
number of times, have the user enter which of the three algorithms he or she
thinks is being used. If the answer is correct, congratulate the user; otherwise,
suggest that he or she run the applet again at another time.


681
Free download pdf