Units of Study
Acceptable Use Policy
STH Google Apps
Java Class Libraries
Help with Ready Classes
Java Style Guide
Sample Game Applet
Other Java Resources
IT Dept. Page
STH Home Page
Programming Style Guide
Here are a number of "rules" for good programming style.
The purpose of a style guideline is to make your programs easier to
understand. It is possible to write a program that does not follow these
rules which will still run correctly. But by following an established
set of style rules, your program will be easier for other programmers
to read and (if necessary) to modify. It should also help you to understand
your own program better, and perhaps help you fix problems in your code.
Note : All programs you write for this course must follow this
- A "comment block" is included at the top of the program,
which includesthe following information:
- The name of the program
- a short description of what the program does
- the author's name
- the date the program was written
- Internal comments are used inside the program to explain the
logic of the program
- Use meaningful variable names that relect the data they store.
- Use the correct data type.
- Always name variable starting with a lowercase letter. Use "interCap"
style of naming variables that require compound words (like firstName),
or use underscores (like first_name).
Use of white space
- Use F2 in Ready to paragraph your code.
- Leave a single blank line between methods, and major sections
of code. Don't leave multiple blank lines (That's just wasting