Programming Assignment Policy
Computer Science 102
All assignments are to be done individually. You may discuss the
assignment with other students in a general way, but the design and
coding of the program is to be done on your own. Plagiarism will not be
tolerated, and violators will be punished, possibly by failing the
"Plagiarism" is copying without attribution. "Copying" includes
copying from your classmates *and* copying from other sources like
books or the internet, except where explicitly permitted by your
Your program should follow the style guidelines below.
Each program should have a header comment at the top, with
the following information: your name, the course name, your email
address, and the assignment number. After this information, describe the
purpose of the program.
Near the beginning of each of your programs, write a table
of contents (inside a comment) that lists the name of each method
Break your program up into methods. Each method
should fit onto one or two screens if possible. Methods on the
same screen should be separated by a line of ****'s, or something
similar. Each method should have a comment, right
after its heading, giving its precondition and if necessary, postcondition.
Place comments in your program wherever something needs to be
explained to the reader. Each non-trivial loop should have a comment.
The variable identifiers should be self-commenting, e.g.,
answer, token, tree.
Use a consistent indentation style that makes the structure of your
program easy to read. Each "}" should line up with the
Strive for as clear and elegant a program as possible. Why come up
with a convoluted solution if a simple solution is possible?
Use final declarations
instead of ``magic numbers'' inside your program.
How to submit
Submit all of the source code (.java files) necessary for your
program to compile, except what is available in standard libraries
(i.e. that you get with "import" directives). If you've been instructed to use
some source code from the textbook, then include any such code that
you have used.
Do not submit compiled files (.class files).
Zip up all of the source code into one file.
Email your solution to both the etutor and the professor as one
attachment. The subject line of your email should be
CS 102 assignment XYZ Firstname Lastname StudentID
where XYZ becomes the assignment number, and you fill in your name and
student ID number.