CSE 341, Java Minor Assignment
Due November 21, 1:30 pm.
Internet Grep
Write a Java Program which takes a string and a URL as command
line arguments and determines the number of occurrences of the string on
the corresponding web page.
For example running my program Find
java Find sun http://www.javasoft.com
gives an answer of seven occurrences of "sun" on the JavaSoft page.
- You will need to take advantage of the Java Class Libaries, the
openStream() method of the URL class will be particularly useful.
- This does not require a substantial amount of code - in particular,
if your program grows beyond 100 lines, you are probably doing too
much work. (My solution is 30 lines).
- The assignment should be done individually (but feel free to talk to
your classmates about language issues and problems).
- My program does case insensitive matches - but you can implement
exact matches if you prefer.