In this homework, you will practice using the following:
- Iteration
- File I/O
For this homework, you will complete three classes that provide some helpful utilities for manipulating and searching strings and files.
For this class, you will complete six methods that use iteration to perform some helpful manipulations of String
objects.
This class provides a subset of the functionality you find in the Unix wc command, including counting the lines of a file and words in a file.
This class provides a subset of the functionality you find in the Unix grep command. You will identify all of the lines on which a given set of characters appears.
The Javadoc for each method describes how the method must be implemented. Carefully read the documentation and implement a solution that adheres to the specifications.
As a reminder, here are a few tips to get you started with the programming assignments. You'll need to follow all of these steps for every programming assignment.
- Make sure you have set up your development environment. You'll need to decide how you want to access github -- using command line tools, Eclipse, to the Github Desktop tool.
- Set up your repository (link below under #1 of Submission Requirements) and clone a copy to your local machine.
- Complete all of the methods specified in the three required classes. You should also create a
Driver
to run some of your own tests. - Do not modify the test cases provided to you.
- Make sure you are passing all test cases.
- Make sure the latest version of your work is on github before the deadline.
- If you are using git from the command line make sure you
git add
thengit commit
and finallygit push origin master
. Do not forget the last step! - If you are using git through Eclipse make sure to
Add to Index
thenCommit and Push
. Make sure you choose theCommit and Push
option.
- Verify that your final solution is what you see on github.
- Review these tips and tricks.
- Use the following link to create your private github repository for this assignment. The repository will be seeded with the skeleton code, test cases, and input files. Homework 2
- For full credit, make sure to follow all Style Guidelines. Points will be deducted for each violation.
Points | Criterion | Description |
---|---|---|
4 | StringManipulations.countChars | Passes all test cases provided and all additional test cases. |
4 | StringManipulations.reverse | Passes all test cases provided and all additional test cases. |
4 | StringManipulations.longestWord | Passes all test cases provided and all additional test cases. |
4 | StringManipulations.shiftLeft | Passes all test cases provided and all additional test cases. |
4 | StringManipulations.repeater | Passes all test cases provided and all additional test cases. |
4 | StringManipulations.removeDuplicates | Passes all test cases provided and all additional test cases. |
4 | WCTool.getLines | Passes all test cases provided and all additional test cases. |
4 | WCTool.getWords | Passes all test cases provided and all additional test cases. |
4 | GrepTool.find | Passes all test cases provided and all additional test cases. |
4 | GrepTool.find - save to file | Passes all test cases provided and all additional test cases. |
5 | Design | Code is well designed and follows all specifications. |
5 | Style | Code follows all style guidelines. |
Partial credit may be awarded for partial functionality and/or partially correct design or style elements.
Any work you submit is expected to be your own original work. If you use any web resources in developing your code you are required to cite those resources. The only exception to this rule is code that is posted on the class website. The URL of the resource you used in a comment in your code is fine. If I google even a single line of uncited code and find it on the internet you may get a 0 on the assignment or an F in the class. You may also get a 0 on the assignment or an F in the class if your solution is at all similar to that of any other student.