Last Updated 2013-02-18
Below here posted 2013-02-06
What amount of JUnit testing is required? - Many people have asked questions about how much testing we are expecting. The purpose of asking you to write JUnit tests is because testing your code is an important skill you should be gaining experience with in cse332. The better job you do of testing your code, the more bugs you can find (and fix) before you submit your code, which will improve your grade on projects.
As far as an exact number of JUnit tests to produce, there is no such answer we can give. Again the purpose is to test your code. Although there are many ways you could test your code, it makes sense to ask you to use a tool (JUnit) that is widely used - and is one you will become very familiar with in cse 331. Some people in our class have already taken cse 331, some are in 331 currently, some are not. If you have taken or are taking cse 331 currently, please continue to use the good practices you learn in that course (with respect to JUnit testing, commenting and otherwise)! However we will not be expecting everyone in the class to know these practices without having taken the course. It makes sense for everyone to use JUnit, but we won't expect everyone to be an expert.
Using Junit most effectively takes practice, but hopefully you will realize that even the simplest use of it can be a big help. As you are writing your JUnit code *do* keep in mind issues of style within your JUnit code (readability, reuse of code), but we will not be grading JUnit files heavily for style. Mostly view JUnit as a tool that is helping you test your code.
Heapsort - For Project 2 you do *not* need to be doing an *in-place* heapsort as was discussed in lecture.
Below here posted 2013-02-05
Code from the textbook - You are welcome to look at and use the code from our textbook. On-line versions can be found using the links at the bottom of our course web page.
Below here Posted 2013-02-03
NO Java Collections - Remember that you should NOT be using data structures from the Java Collections (e.g. no ArrayLists) when implementing the project. It *IS* o.k. to use things from java collections when testing. It is fine to use methods from the Math class.
Below here Posted 2013-02-03
Exceptions in FourHeap - Please do throw appropriate exceptions in FourHeap whenever needed. For example, when deletemin on an empty heap, you could define UnderFlowException as is done in the Weiss text, or you could also use NoSuchElementException (in which case it will be fine if you want to import it).
Command Line Args - One of the changes you need to make to Wordcount.java is to allow it to handle and properly process more parameters. As it is set up, it only handles a single parameter. For phase A you only need to have it work for the required phase A options.
Your WordCount should work as specified in the spec when given correct input parameters. If given incorrect or an incomplete set of parameters, their behavior is unspecified. So we will not be expecting your code to check for and handle all other combinations of parameters.