York U: Redefine the Possible HOME | Current Students | Faculty & Staff | Research link: Future Students, Alumni & Visitors
Search »  
Department of Computer Science and Engineering
Home
Announcements
Course Calendar
Course Forum


Y graphic
CSE 1030 - Assignment #1 - Utility Class for Factoring Integers

SC/CSE 1030 - Fall 2012 - Assignment #1

A Utility Class for Factoring Integers



Your goal for this assignment is to develop a Java Utility Class implementing Integer Factorisation. Integer Factorisation is a mathematical procedure with important applications in Computer Science Theory, and especially cryptography.

The API that you will have to create is documented here: The Factor Class.

To complete this assignment, you must do three things:

  1. Create the Factor class, matching the details given in the API.

  2. Include Javadoc comments in your source code, so that the javadoc tool produces an HTML API document identical to the provided API, when run with the following command:
    javadoc -tag param -tag pre.:a:"Precondition: " -tag return Factor.java

  3. Submit your Factor class electronically before the deadline using the submit command:
    submit 1030 a1 Factor.java

Some notes:

  1. Avoid this "gotcha": The third word in the submit command above is the letter a and the number one (not the letters A followed by L).

  2. You must create the complete Factor class, no template is provided.

  3. A Java program that provides a simple command-line interface and that calls your Factor class to do the factoring, is available here: a1.java. Compile (javac a1.java Factor.java) run (java a1) and use this program to test your code.

  4. Your source code should be well organised and documented.

  5. You do not have to implement a fancy nor complicated factorisation algorithm, a simple loop and test of even divisibility will do.

  6. Remember the Course's, Department's, and the University's policies on academic honesty - do your own assignment yourself. (Besides, doing it yourself is the only way to learn!)

  7. This assignment is due on Friday September 14, at noon. Late assignments will not be accepted.
    Start Early - Don't leave your assignment to the last minute!

  8. Remember that you can use the submit command more than once - if you submit your Factor.java file again, it will replace the previous submission. So if you make a mistake, don't panic, just fix it, and resubmit it (before the deadline). Additional information regarding the submit command can be found by typing man submit at the command line.

  9. Do not use the Type package, nor its earlier incarnation, the york package.

  10. Your programs must compile and run on the Prism computers.

  11. Your grade will be a number from 0 to 10. The breakdown is
    2 marks for properly defining the Factor utility class.
    2 marks for a working smallestFactor(int C) function.
    4 marks for javadoc comments that match the provided API.
    2 marks for coding style (nicely organised code with comments).

  12. Have FUN!






graphic rule