Preconditions and Postconditions

8/27/97


Click here to start


Table of Contents

Preconditions and Postconditions

Preconditions and Postconditions

Example

What are Preconditions and Postconditions?

Example

Example

Example

Example

Example

Example

Example

Another Example

Another Example

Another Example

Another Example

Always make sure the precondition is valid . . .

. . . so the postcondition becomes true at the functionís end.

A Quiz

A Quiz

On the other hand, careful programmers also follow these rules:

On the other hand, careful programmers also follow these rules:

Example

Advantages of Using Preconditions and Postconditions

Summary

THE END

Author: Michael Main and Walter Savitch

Email: mgv@cs.sc.edu

Home Page: http://www.cs.sc.edu