SWE 3633 Lecture Notes - Lecture 31: Natural Language, Postcondition, Exception Handling
Document Summary
Operations specifications: class or module: identify the operation, signature: the operation name, interfaces (parameter types and return type) ---- the. Syntax of the operation: description: couple of sentences describing the operations responsibilities. Behavior: a detailed account of what the operation does, any constraints on the parameters and operations, what exception handling is performed, etc. the semantics of the operation. Implementation: additional details on algorithms and data structure used for the implementation. The preferred way is to use the declarative specification unless there is a specific algorithm or data structure that the designer wants the programmer to use. Besides the pre and post conditions, we can also specify those conditions that are true between calls to the operation. Operation specification along with pre and post conditions. For a class, invariants: must be established by class constructors, must be preserved by every exported operation in the class. Heuristics for specifying pre, post and invariant conditions of the operation"s behavior.