This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: 01/29/09 03:22:24 1 readme CS 61B Homework 2 Due 5pm Wednesday, February 4, 2009 This homework assignment is designed to help you learn about building Java classes and to observe the decomposition of a complicated task into simple subtasks. This is an individual assignment; you may not share code with other students. Copy the Homework 2 directory by doing the following, starting from your home directory: cp -r $master/hw/hw2 . cd hw2 Your task is to fill in the implementation of a class that manipulates dates. Do not use any of the built-in operations on dates provided in the Java library in your solution. The overall task is broken down into subtasks, which we suggest you implement in a bottom-up order, so that you can easily test as you go. The grading test cases will give partial credit for the more basic operations, even if some of the higher level operations do not work properly. Please observe these notes on grading. 1) Your program must compile without errors to receive any partial credit on this assignment. If only one or two of your methods work, remove any code that causes problems for "javac" before submitting your solution. However, don’t remove any of the method declarations that appear in the skeletal Date.java we give you. 2) We have provided a main method in the Date class that tests some of your methods. You are welcome to modify the main method as you please, perhaps to add further tests of your own. We will not be grading the main method in this assignment. (It does, of course, need to compile.) 3) You are welcome to add new methods to the Date class. Since they will presumably be "helping" methods, declare them "private", not "public". 4) Do not not change the prototype (interface) of any method. If you change the arguments or the return type, or you change a method from static to non-static, your program will not compile with our test cases, and will not receive credit....
View Full Document
- Spring '01
- Data Structures, main method, subtasks