AssignmentsSpecifications, supporting files and solutions to all assignments will be posted here as they become available.
General Assignment Material
Large Update: September 28th, 2011. We have updated the instructions and split them into 2 parts. The first are instructions for assignment submission. This is a slimmed down form of the original regulations. These regulations you must follow or else risk losing many points on the assignment. There is also a 2nd file, which is programming guidelines. The purpose of this file is to take some of the useful guidelines and tips that were originally in the instructions file and separate them. These are things that you should follow as closesly as you can. However, failure to do so will only result in a few points deducted (if any) as the guidelines are not always easy to follow and are often subjective. In otherwords, the file Instructions (instructions.pdf) has to do with COMP-202 regulations that you must follow in order to make grading as easy as possible. These will be things such as submitting your assignment on WebCT, submitting it ontime, etc. The ProgrammingStandards.pdf file contains general guidelines that are good to keep in mind while programming and are not COMP-202 specific.
- Revised Instructions
- General Programming Guidelines
- Reference program illustrating the General Instructions and Regulations:
- Template for single-class Java programs
- Assignment Submission Instructions (includes instructions on how to check your submission and edit it after submission)
- Policy on Queries and Complaints About Assignment Grading
Assignment 1Due Thursday, September 22nd, 23:30.
- Assignment1.zip (contains zipped code for you to use)
- I have updated the PDF slightly to clarify the output of the program through the test program. It will look slightly different when you run it through the test program (java Calculus < Question1TestFile.txt) vs when you run it normally (java Calculus). Please see the assignment specification for more detail. ---Dan
- Calculus.java (question 1)
- TaxCalculator.java (question 2)
- TypeExpressionResultsSolutions.txt (question 3)
Assignment 2Due Monday October 17th, 2011 at 23:30. (NEW DATE!) SOLUTIONS posted!
- Specification (minor clarifications on EPSILON added October 2nd, 14:00)
- AssignmentTwoTests.java (contains a test program which you can use as a start to test your program) (Updated Oct. 6th to improve print statement output when a test fails) (Updated October 16th to once again improve the print statement output when a test fails)
- To run the test program, you should download AssignmentTwoTest.java into the same folder as you place your code for your assignment. You should then be able to compile them all together. There are further instructions on the specification pdf on this. It is mandatory that your code compile with the test code. (It is not mandatory that your code pass every test although you will need to for full marks.) If your code does not compile with the test code, then the most you can get on the assignment is 50% . Please see a TA or instructor if you are unable to do this. (Running it through the test program will verify that it can be run automatically) It is also suggested that you add additional tests to these as the TAs will use additional test cases.
- Note that the due date of the assignment has been extended until the 17th of October. This is mainly to accomodate the fact that we have a long weekend the week before and will miss a lecture.
- OnlineStore.java solutions
- GeometryTools.java solutions
Assignment 3Due Thursday November 10th, 2011 at 23:30. (Note the updated date)
- Specification (Last update: October 18th, 16:45, fix couple typos)
- Updated Computer.java (There was a small error in some of the error messages being displayed in the simulated computer. It is a very small difference but some people got error messages (in the simulated computer) that looked like "Cant rename [Ljava.lang.String;@77ff92f5 " This fixes that.
- Assignment3Code.zip (Contains support files:)
- Computer.java (for part 3)
- ComputerGUI.java (for part 3 and 4)
- InstructionList.java (for part 3 and 4)
- Instruction.java (for part 4)
- AssignmentThreeTests.java (for all parts)
Assignment 4Due Monday December 5th, 2011 at 23:30.
- November 16th: Added a missing "no" branch to figure 3)
- November 24th: Added missing getRadar method specification to the list of methods provided by the Spaceship class
- December 1st: added desiredYPos initialization to flowchart
(Contains the compiled Spaceracer code, plus the following .java
- OnboardComputer.java (for question 5)
- Range.java (for question 3)
- RangeSet.java (for question 4)
- StudentAIQuestion1.java (for question 1)
- StudentAIQuestion2.java (for question 2)
- StudentAIQuestion6.java (for question 6)
- November 24th: Removed erroneous line "new editor.menu.LoadMenu(null);" from the OnboardComputer class and added "import spaceracer.*" to the OnboardComputer class.