CIS 2503 - Intro to Java
Program Documentation and Style
One of the requirements of this course is that you program in a professional programming style. 20% of your grade on each programming assignment will be based on program documentation and style. The goal is to make your program easy to read and understand.
- You should follow a standard indentation style that highlights the structure of your program. The indentation style used in our textbook is OK. As long as you consistently follow a neat, professional looking style, I won't complain.
- Each program must begin with a comment that includes: a) your name, b) program status - either "Complete" or describe any incomplete or non-functioning part of your program, and c) a brief 1 to 3 line description of what the program does.
- Each method should begin with a 1 to 3 line comment describing what the method does.
- If a method is longer than 10 or 20 lines, it should be divided into sections of related statements (like paragraphs). Include a 1 or 2 line comment at the beginning of each section describing what the section of statements does. Include a blank line between sections.
- All local variables and constants should be declared at the beginning of the function block.
- Use meaningful identifiers. One or two character names are rarely meaningful. For example, c and ch would not be acceptable names for a variable that holds the change returned from a purchase. chng is OK. change and changeDue are even better.
- Declare one variable or constant per line and include a comment to the right describing how the variable or constant is used.
Return to Java Home Page
URL: http://www.austin.cc.tx.us/comer/cis2503/
Copyright: Ó 1998 by the Austin Community College.
Department of Computer Studies. All rights reserved.
Comments to: Bob Comer
Last updated: September 12, 1998
Austin Community College is an equal opportunity educator and employer.