Professional Documents
Culture Documents
A T1
T1
A
T1 T2
A B
T2
T2 B T3
T3
B C
T3 T4
C
T4
D T5
Te s t s e Te q s u t e ns ce Te e q s u t 1 e ns ce eq
WeatherStation
identifier
repo rtWeather ()
calibrate (instruments)
test ()
startup (instruments)
sh utdo wn (instruments)
Pre-condition
-- the sequence has at least one element
T’FIRST <= T’LAST
Post-condition
-- the element is found and is referenced by L
( Found and T (L) = Key)
or
-- the element is not in the array
( not Found and
not (exists i, T’FIRST >= i <= T’LAST, T (i) = Key ))