Informal
A "style" that is used far too often :(
Structured
No formal specification, but preconditions, postconditions, exceptions and invariants are present.
Formal
Formal JML specification using assertions to specify the behavior of a method.
Some (more like all actually :) ) people claim that formal specification are a waste of time. We tend to disagree with that. Formal specifications force you to think about what you're doing, which often results in improvement of your design before you waste time implementing something that won't work. Also the reuse of classes with formal specifications is much easier than classes with specs like "this method will comb your hair". And after all, the Jutil.org code is meant to be reused.
|