ITI1121 (summer 2015) assignment directives
All assignments in this course are subject to all the following directives.
- Late assignments will be accepted up to 24hs late;
assignments that are between 1 min and 24hs late will be worth 70% of the on-time assignment grade.
- Assignments must be done individually.
Handing an assignment
- All assignments must submitted electronically using
- Carefully read and follow the guidelines for naming the files
(specific to each assignment);
- Submit the files using Blackboard Learn:
Important note: File names containing
special characters (ie. -,#,$,^,@, space, etc.)
are known to cause errors with Blackboard Learn.
- Assignments that do not conform to the above procedure will not be marked;
- Never upload the the byte-code files (files ending with the
suffix .class); all the assignments are systematically re-compiled.
Identify yourself clearly on everything you hand in
Always include a class called StudentInfo having a method called display.
The method display prints on the standard output
the following information.
Make sure to call the method StudentInfo.display() from the main
method of all the drivers.
The above information should also appear in all of the following places:
- Your name
- Student Number
- Course number and section if applicable, i.e. ITI 1121-A
- The assignment number
Example of a class header:
- at the beginning of each program/class (in comments)
- at the beginning of each program's output (call to SudentInfo.display())
// Author: Tony de Peltrie
// Student number: 19850712
// Course: ITI 1121-G
// Assignment: 10
// Question: 41
- Everything you hand in must compile and run using the Java SE JDK 5.0 system on SITE's PCs;
- The maximum grade for an assignment that does not compile is 30%;
- You may only use features and library methods of Java that have been presented in class or tutorials at the time an assignment is due.
A note on the marking of code
Marks for code you submit in answer to a question are based on the code's
correctness and quality (which includes clarity among other things).
Each part of your solution (e.g. each method) will be assessed individually,
relative to the conditions and requirements stated in the questions.
For most programming questions you will be given a main program that
aims to draw out as many bugs as possible. But it will not usually
exhaustively test each part of your solution, so getting the overall program
working correctly does not mean all the individual parts work correctly in
all cases. Therefore you will not automatically get full marks for
correctness just because the main program produces the correct output.
Use Javadoc comments
Each class, method, variable must be documented.
Java coding conventions
Your Java code should follow the standard code conventions for Java, as
defined at this web site:
Note that this is very detailed, and in many details it differs from
what was done in ITI 1120. Read it all very carefully and be sure your
program conforms to its requirements.
Identifiers should be as meaningful as possible and follow these
- Only declare variables that are actually used;
- Do not allocate memory unless necessarily;
- Do not use the same variable for different purposes;
- Local variables should not be confused with instance variables: declare
each variable in its appropriate place;
- Every variable should have a comment describing its purpose. Be brief.
This is called a data dictionary - it should be placed at the beginning of
every method, either before or beside the declarations.
- Good structure is very important. Introduce your own abstract classes
and/or interfaces and decompose your algorithms/methods into
meaningful sub-algorithms/methods whenever this improves clarity.
- Each method (including "main") should be preceded by comments describing
its purpose and the algorithm it uses (if the algorithm is very simple,
it needn't be described). These descriptions should be BRIEF.
- Your program must be indented in a systematic way that reflects the
nesting of its statements. There are good editors doing this
automatically for you; ask your TA.
- Output should be nicely spaced and easy to understand.
In particular, it should be easy to understand the output without looking
at the program listing. This means that for every value in your output
you must print a short message explaining the meaning of the value;
- Before your program reads values from the keyboard it must print a
prompt describing what the user is required to enter.