You must turn in a functionally correct program to receive any credit. The grade you receive will be based on when you turn it in minus any deductions for the quality of your implementation and/or multiple submissions. There is no deduction for the first submission and a 5% deduction for each additional submission, if any. Programs will be checked for correctness once a day and you will be notified by email if your submission is not functionally correct. Programs will be graded after the last due date and the results will be emailed to you within a few days of that date.
100% (minus any deductions) by 9:00pm Monday, 1/14/07
90% (minus any deductions) by 9:00pm Tuesday, 1/15/07
80% (minus any deductions) by 9:00pm Wednesday, 1/16/07
70% (minus any deductions) by 9:00pm Thursday, 1/17/07
None so far
1. Your program must be an individual and original effort. Except for any situations explicitly identified in this assignment, you may only receive assistance from your instructor or tutors provided by the Computer Science department (Sun-Thurs 7-9:00pm). See the course syllabus for the significant consequences for plagiarism.
You will be writing a Java class that represents a fraction. This class will always store the fraction in reduced form regardless of the data provided to the constructors. For example, the fraction 3/9 would be stored as 1/3. The class will have three constructors, and a variety of other methods, including methods to add, subtract, multiply, and divide fractions.
1. Read the javadocs for the Fraction class carefully – if you don’t know how to interpret the documentation you will not be able to implement the code. You may ask your instructor or other students in the class to help you read the javadocs but remember that other students may not help you with your code.
2. Develop incrementally. Once you understand the documentation you should write a “stub-class” for the Fraction class. Recall that a stub-class has the minimum necessary code to compile. In this case, all methods should be implemented as stubs. Once you have done this you should compile your Fraction class and run the JUnit tests on it (the tests should all fail). Fix any compiler errors before moving on.
3. For each method, read the javadoc specification and test method in FractionTest.java to help you understand what the method should do before implementing it.
4. Keep track of your hours worked as you go, so you don’t have to guess when you hand in your assignment (see handin section below for information on time.txt).
throw new IllegalArgumentException();
* Provide a brief description of what the source file is/does
* @author Your Name Here (do the obvious)
* @version Program X (replace the X with the actual program number)
* @version CPE102-X (replace the X with your section number)
* @version Winter 2008
Testing With the Provided Tests
Handing in Your Source Electronically…
Example time.txt file:
12:01pm vogon ~$ handin graderkm Program1-x Fraction.java time.txt