Java Style Requirements Classes: 1. Every class will have an introductory comment that explains: a. The purpose of the class in terms of the application; b. Any environmental requirements this class has (for example, files the class needs to have available); c. Any order dependencies among the methods of this class (e.g., this method must be called before that one); d. How many objects of this class are expected during a single execution; e. Any external streams or external data used by this class. 2. Each class will have a name beginning with a capital letter. The name will indicate the purpose of this class in the application. 3. Most classes will be built around some private data. Each method in the class will manipulate that data in some way. A few classes may be developed whose purpose is to coordinate objects of other classes to perform some major function of the application. Methods: 1. Each method will have an introductory comment that explains: a. the purpose of this method in the application; b. the meaning of each parameter and returned value; c. limitations on the range of possible values of each parameter and returned value; d. the role of each possible exception thrown by this method; e. Any external streams of external data used by this class. 2. Each method will do only one task. Usually a method will be no more than 8 to 12 executable statements in length. Exceptions will be justified in a comment. 3. All uses of constants other than 0 or 1 will have a comment explaining their purpose. Control Flow: 1. Flow of control will be indicated by nesting ( using a three space indentation at each level) of control constructs. 2. Every label will have a comment explaining its purpose. 3. Every opening curly bracket will appear in the same column as the closing curly bracket which corresponds to it. 4. You will never use control constructs (if, loops, switch) nested more than three levels deep. Variables: 1. Every variable will have a name that indicates its purpose. Variable names will start with a lower case letter. All words in a variable name except the first will begin with a capital letter. 2. Every variable will have a comment on its declaration explaining its purpose in the method or class in which it is declared. 3. Named constants will have names that are all capital letters.