Programming Convention

As with any projects that you will do in industry, you are expected to follow a specific set of programming rules for any work that you do in relation to this module. You must use the conventions that are laid out in "The Elements of Java Style", with the amendments listed below:

The following amendments apply:

Rule 5:
Brackets must be brought down to next line, so that opening and closing brackets are indented by the same number of spaces.
Rule 5:
Indentation must be done four using spaces.
Rule 66:
Always use opening and closing brackets on an empty loop.

Enums and Static

So as to make each example a stand-alone compilable file, I have embedded the example's various classes as inner classes of the containing applet. When using this code in real projects, you should use packages and seperate the various classes into their own class files.

As the various classes in my examples are inner classes, they can not support either enums or static fields. In real projects, where it is appropriate you should adjust the example code to include enums and static fields.

Exception Handling

In order to keep the code brief, I have not dealt with exception handling. In a real project, you must always properly deal with exception handling.

 
<div align="center"><a href="../versionC/index.html" title="DKIT Lecture notes homepage for Derek O&#39; Reilly, Dundalk Institute of Technology (DKIT), Dundalk, County Louth, Ireland. Copyright Derek O&#39; Reilly, DKIT." target="_parent" style='font-size:0;color:white;background-color:white'>&nbsp;</a></div>