















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
















Dr. Roger T. Alexander University Services Building, Room 240 Voice: 491-7026, Fax: 491- [email protected] http://www.cs.colostate.edu/~rta
2
3
Contracts (in human affairs)
4
Obligations Benefits Client (Must ensure precondition) Be at the Santa Barbara airport at least 5 minutes before scheduled departure time. Bring only acceptable baggage. Pay ticket price
(May benefit from postcondition) Reach Chicago
Supplier (Must ensure postcondition) Bring customer to Chicago
(May assume precondition) No need to carry passenger who is late, has unacceptable baggage, or has not paid ticket price
7
8
9
10
13
14
15
19
20
21
22
25
26
27
31
32
33
34
37
public class SimpleStack {
/** Put o onto the top of the stack. / public void put( Object o) { ... } /* Remove the item at the top of the stack. / public void remove() { ... } /* Get the item on the top of the stack. */ public Object item() { ... }
}
39
40