CSC/ECE 517 Fall 2011/ch18 6a sc: Difference between revisions
Jump to navigation
Jump to search
Line 7: | Line 7: | ||
=Programming by contract= | =Programming by contract= | ||
== | ==History== | ||
The paradigm was first introduced by [http://c2.com/cgi/wiki?BertrandMeyer Bertrand Meyer], the creator of [http://c2.com/cgi/wiki?EiffelLanguage Eiffel programming language]. Although Eiffel has implemented assertions as built in programming by contract support, the concepts can be applied in any language. It uses pre-conditions and post-conditions to document or programmatically assert the change in state caused by a piece of a program. [http://c2.com/cgi/wiki?DesignByContract Cunningham & Cunningham, Inc., Design by Contract] | |||
==Benifit== | ==Benifit== |
Revision as of 17:57, 15 November 2011
Programming by Contract
Common programming errors
Programming by contract
History
The paradigm was first introduced by Bertrand Meyer, the creator of Eiffel programming language. Although Eiffel has implemented assertions as built in programming by contract support, the concepts can be applied in any language. It uses pre-conditions and post-conditions to document or programmatically assert the change in state caused by a piece of a program. Cunningham & Cunningham, Inc., Design by Contract
Benifit
How does it work with inheritance?
Examples
Example 1
Example 2
Example 3
Summary
References
http://en.wikipedia.org/wiki/Design_by_contract
http://www.cs.unc.edu/~stotts/204/contract.html
http://www.cs.usfca.edu/~parrt/course/601/lectures/programming.by.contract.html