If the code and the comments disagree, then both are probably wrong. -- Norm Schryer

Every program has at least one bug and can be shortened by at least one instruction -- from which, by induction, one can deduce that every program can be reduced to one instruction which doesn't work.

Programming Project Criteria:

  • Before you start a project, make sure you read the problem carefully and check the rubric for point value requirements.
  • Always start a programming project with a new workspace named the same as the project, but with your last name first. (EX: CasoProject4-5.)
  • Always add a new class named to reflect the content of the project if a file wasn't provided for you. (EX: call the class Momentum for project 2-5.) Don't forget to capitalize the file name since it is also a class name.
  • Always begin your file with one of the block headers provided below. The easiest way to get this header into your file is to select it here, copy it, and then paste it into your file. You'll need to replace the items in <<>> with information appropriate to the program or programmer.
  • When you are finished with a programming project copy the entire project folder from  your folder on the network into "\\hydra\nohs\AP Computer Science\Submissions" making sure to put it into the correct class period folder. I will grade the project online, print the completed rubric with your results on it, and place the printout in your folder on the door to the lab.

This header is for the file which contains the main method or extends GBApplet.

/**********************************************************
* <<Your Name>>                                           *
* Period <<#>>                                            *
* Date Last Modified: <<#/#/## >>                         *
* Project: <<name or # >>                                 *
* Description of the project:                             *
*   1-Goal of the program: <<Describe the overall goal in *
*                            one or two sentences.>>      *
*   2-Significant constants: << List all constants        *
*                               declared and used in the  *
*                               program.>>                *
*   3-The user inputs are: <<List all data that the user  *
*                           must provide to the program.>>*
*   4-The program computes: <<List the quantities the     *
*                             program will compute.>>     *
*   5-The program outputs: <<List the items that the      *
*                            program displays on the      *
*                            screen or writes to a file.>>*
**********************************************************/

This header is for classes which do not contain a main method and are not applet files.

/*******Responsibilities of a <<Class>> object:*****************
*                                                              *
* A <<ClassObject>>:-Stores <<list what the instance           *
*                             variables are storing>>          *
*                   -Can calculate and return <<list what the  *
*                    accessor methods calculate and return.>>  *
*
                   -Can modify itself by <<list what the      *
*                    mutator methods can do.>>                 *
* A <<ClassObject>> knows how to: <<LIST ONLY THE ONES YOU     *
*                                    HAVE DEFINED
>>            *
*                   -create memory space for a <<Class>> object*
*                   -create a deep copy of itself              *
*                   -create an instance of a <<Class>> object  *
*                    initialized with user provided instance   *
*                    variable values.                          *
*                   -turn itself into a String object for the  *
*                    purposes of output.                       *
***************************************************************/

In the second header, the "knows how to" items listed mean the following:
       The class has a default constructor.
       The class has an initializing constructor.
       The class has a copy constructor.
       The class has a toString method.