Page 23 : 32
Object-oriented Programming in C#
Contracts and Assertions
* Correctness
Software Qualities
Correctness
Specifications
* Specification with preconditions and postconditions
Logical expressions
Examples of preconditions and postconditions
An Assertion Language
* Responsibilities and Contracts
Questions Related to Responsibility
Division of Responsibilities
The highly responsible program
Responsibility division by pre and postconditions
Contracts
Everyday Contracts
Contracts: Obligations and Benefits
Obligations and Benefits in Sqrt
* Class Invariants
General aspects of contracts
Everyday invariants
An example of a class invariant
* Inheritance is Subcontracting
Inheritance and Contracts
Subcontracting
Class invariants in the triangle class hierarchy
Assertions in Abstract classes
* Design by Contract
Design by Contract
DBC and Programming Languages
Code Contracts in C# 4.0
* Loop Invariants
Loop Invariants
Inheritance and Contracts
How do the assertions in a subclass relate to the similar assertions in the superclass?
The relationship between inheritance and contracts