{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

05HW1CodeCamp (1)

05HW1CodeCamp (1) - CS108 Stanford Winter 2012 Handout#5...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
CS108, Stanford Handout #5 Winter 2012 Young HW1 CodeCamp Assignment by Nick Parlante For this first homework, you will run through a series of small coding problems to get warmed up with Java code, Collection classes, and unit tests. Get in the habit of pulling up the javadoc pages for String, Collection, and leveraging the built-in libraries. Download the hw1CodeCamp.zip file from the course page. That contains a hw1CodeCamp directory that is an Eclipse project -- import it into Eclipse to get started. This homework is due at midnight at the end of Wednesday January 18 . You have a variety of small coding problems to solve, each with unit tests. You should fill out the set of unit tests for each problem until you are confident that your solution is correct. The deliverable is that there are 5 or more assertEquals() or other assertions for each public method. The starter code has some tests filled in for some of the problems to get you started, and you should add more tests. Part of this assignment is about experimenting with unit tests to really nail down the correctness of your code beyond the usual "it appears to work" level. Since the problems are only moderately hard, have well-defined input/output interfaces, and you can write unit tests, it is a reasonable goal that you will turn in literally perfect code for all the problems -- zero bugs. Producing a body of zero bug code does not happen by accident. It requires some organized effort at testing. Our grading will be pretty simple -- we just have automated tests for each problem that verify that your solution works correctly for a variety of inputs. The grading in that case will mostly just be about correctness. That said you should still try to write clean code and use decomposition. CS108 homework ground rules: the starter code will often include some boilerplate such as the prototypes for methods you need to write. A starter method may include a throwaway line like "return 0;" just so it compiles when you first load the project. Your code can assume that all inputs are formatted and structured correctly. Your solution should work correctly when presented with valid inputs, and we will not worry about invalid inputs (yet). If your code takes in a parameter such as a String or a List, you may assume that the String or List passed in is not null, unless null is specifically mentioned in the specification. In other
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}