Homework Guidelines

Intro to Object-oriented Programming with Java (COP 2551)

This page provides guidelines for preparing your homework, the criteria that will be used to grade it, and how to get help if you have trouble with the assignment.


Homework preparation

  1. Develop your program using the JCreator LE IDE. (You can use any IDE, but I will compile and run your program with JCreator LE 4.0.) The source code file you submit must have exactly the same name as the class it defines (be careful of case!) with a .java extension; e.g.: NameTest.java

  2. The first lines of your program must be comments, including the source file name, the course number and assignment number, your name (or names, if a team assignment), the date written, and a short description of the program. For example:

/* Sphere.java
 * COP2551 HW03
 * October 5, 2006
 *
 * Calculate surface area of a sphere
 */

  1. Use descriptive method and variable names. Lowercase should be used, except the first letter of each "word" in a name should be uppercase for readability. For example, qtyPurchased, taxRate, custFirstName are preferred to q, txr, and cfnm.

  2. Your program must meet these coding standards:

    1. Indentation must be consistent, including at least statements within a block (braces). Set editor tab stops to 4, and choose the option to use spaces rather than tabs.
    2. Neither statements nor comments should be extend past column 80.
    3. Leave whitespace (skip a line) at least:
      1. Before and after flow-of-control structures (if, if...else, while, for, switch, do)
      2. Between method definitions
      3. Wherever else it adds to the clarity of the code by separating it into logical sections.
    4. Braces ( { and } ) defining a block (of a function body, or compound statements following a control-flow keyword) should be aligned vertically or in the "K&R style" – but be consistent! For example:

          if (x > 0)       /* vertical alignment style */
          {
             statements
          }

           - or -

          if (x > 0) {     /* K&R style */
             statements
          }
       
  1. Your program must include comments adequate to describe the purpose of all methods and variables, and any non-obvious logic, but don't obscure your code with unnecessary comments. 

Grading criteria

Your programs should produce the correct output for the range of input specified. Each homework assignment is graded on a scale 0-100 based on the following criteria. Note that your program must compile to receive a minimum grade of 70.

Grade Program Characteristics
90-100 All specifications met; the source code is efficient (uses the best algorithms and functions for the task) and maintainable (is easy to follow and well-documented with descriptive variable and function names, comments).
80-89 All major specifications met, but source code is inefficient (poor logic or inappropriate functions used) and/or difficult to maintain (hard to follow or lacking in documentation)
70-79 Compiles, but some major specifications are not met (function not provided or incorrect output)
60-69 Does not compile, but reasonable attempt made.
0-59 Does not compile, little evidence of effort, or not turned in.
0 An assignment similar beyond coincidence to another student's.

Additionally, two points will be deducted from the above grade for each instance of non-compliance with the homework preparation requirements listed above, up to a maximum of 10 points. Review your work before submitting it to ensure it complies with these standards. Your grade and comments will be included in the source code file, which will be returned to you by email .


Homework assistance

Following these steps will reduce the time you spend coding and debugging your programs.

  1. Read the assignment carefully and make sure you understand exactly what is required.

  2. Create an overall design listing the major classes that need to be written, then break down each of these into specific methods.

  3. Code, compile, and test incrementally; "stub" methods that will be written later.

  4. Correct syntax errors by analyzing the error messages provided, comparing your code with program examples from the text.

  5. When you have obtained a clean compile, rigorously test your program to determine if it produces the correct output for the range of input specified in the assignment.

  6. To correct logic errors, insert statements to display the value of variables at key points in your program.

  7. If you can't identify the reason for an error by following the above steps, ask your partner (if a team assignment), a classmate, or any other knowledgeable programmer to look at your code. However, keep our policies on academic integrity in mind:  your final product must represent your own work.

  8. Ask me for help during the lab period in class or office hours, or email me for assistance. Be sure to include your source code as an attachment, send your email to sdifranc@fccj.edu, and make sure to include the word "Help" in the subject line.


Homework Submission

Homework is due by midnight of the date specified in the class schedule. Send your homework as an email attachment from your College email account to sdifranc@fscj.edu.  Include your name, homework number, and the class and reference number in the subject line. Example:

Sean Connery HW03 COP2551/297177

Note: If you are asking for help on an assignment, rather than turning it in, make sure to include the word "Help" in the subject line.


Team assignments

For some homework assignments, you will be randomly teamed with another student. Only one program is submitted, and both team members get the same grade. If more than one program is submitted, I will randomly choose one to grade. You can divide the work any way you can agree on. Some common possibilities:

  • Each team member writes the program individually, then collectively compare them and submit the better one
  • One team member writes the program, the other independently tests it
  • The team decomposes the program into functions, which are assigned to individual team members to write and test, then integrated
  • One team member does all the work, the other provides the food, moral support, or some other "team-building" asset

However you divide the work, make sure you have each other's email address to communicate efficiently. Don't rely on seeing your team member in class to resolve problems.

Follow all the homework guidelines above. One team member should submit the assignment, sending a copy ("cc") to the other team member. Both team member's names should be included in the first line of the source code, and the email subject line. 

Updated: 2010-08-25