Lab 0 - Refresher

Due Friday 1/28 - 11:59pm

In this assignment, you will brush up on your Java skills and practice jar'ing your code and submitting assignments using SVN.

Requirements

    1. You will write a small program that opens a specified text file and counts the number of times a given word appears in the file.
    2. The output of your program will be a single line of text: Count: X, where X is the number of times the word is found in the document.
    3. You will submit a jar file named lab0.jar containing your .class files and your .java files.
    4. Your main method must be in a class Driver.
    5. Your program will take four command line parameters:
      1. -f - a flag to indicate a file will be specified
      2. /path - an absolute path specifying the text file to process
      3. -w - a flag to indicate a word will be specified
      4. word - the word to find in the file. Partial matches should be counted (e.g., the word "sea" should match the term "Search!".).
    6. Sample:

java -cp lab0.jar Driver -f /home/srollins/file.txt -w search

Make sure to follow the submission instructions. Also, see the Assignment Submission page for more information. If your assignment is not submitted in the correct directory or with the correct name you will not receive credit for the assignment.

Submission Instructions