Assignment 2
Assignment 2
individually. You cannot use code written by your classmates. Use code found over the Internet at your own peril -- it may not do exactly what the assignment requests. If you do end up using code you find on the Internet, you must disclose the origin of the code. As stated in the course policy document, concealing the origin of a piece of code is plagiarism. Use the Message Board for general questions whose answers can benefit you and everyone. Project skeleton:
http://www.ics.uci.edu/~lopes/teaching/inf141W13/assignments/Assignment2.zip
General Specifications
1. You can use any programming language, but Java is strongly encouraged. This spec has all sorts of helpers for Java. Also, the next homework will use a Java crawler, so you may want to use this homework to brush up your knowledge of the language. 2. If you use Java, your solution must fill out the program skeleton provided. a. Fill in each method according to its Javadoc specification. b. Feel free to create additional methods / classes where necessary 3. If you dont use Java, you should produce a similar skeleton to start with and fill it out. You should also be very precise with instructions for how to run your program what programs are needed, versions, etc. If the TA cant run your program, your grade will reflect that. 4. We will test your program with our own text files. 5. At points, the assignment may be underspecified. In those cases, make your own assumptions and document them.
Once you have implemented your palindrome counting algorithm, please perform a short analysis of its runtime complexity (does it run in linear time relative to the size of the input? Polynomial time? Exponential time?) This analysis should go in the analysis.txt file in this package.
Evaluation Criteria
Your assignment will be graded on the following four criteria. 1. Correctness a) How well does the behavior of the program match the specification?
b) How does your program handle bad input? 2. Efficiency a) How quickly does the program work on large inputs? 3. Aesthetics a) Is the program clearly documented and well written? 4. Understanding a) Do you understand the program you wrote? This will be tested during meetings with the TA. If you show poor understanding of the program, none of the other criteria will matter much for your grade.