with Text_io; generic type ELEMENT is (<>); SIZE:integer:=500; with procedure Put(X:ELEMENT) is <>; package SET_OF is -- by R J Botting, CSUSB type ESET is limited private; -- all operations will be element by element NULL_SET:constant ESET; function Member(I:ELEMENT; ISIN:ESET) return boolean; function Empty(ISIN:ESET) return boolean;--Empty(NULL_SET); function Full(ISIN:ESET) return boolean; function Max(S:ESET) return ELEMENT; function Min(S:ESET) return ELEMENT; procedure Empty(S:out ESET); -- Makes S into an empty set procedure Put(S:in ESET); -- output set to standard output procedure Put(I:ELEMENT; INTO:in out ESET); -- put I into set procedure Get(I: out ELEMENT; FROM:in out ESET);--get fastest procedure Getmin(I: out ELEMENT; FROM:in out ESET);--get first procedure Getmax(I: out ELEMENT; FROM:in out ESET);--get last procedure Take(I: ELEMENT; FROM:in out ESET);--take I out EMPTY_GET: exception;--Attempt to get next/max/min element from empty set FULL_PUT : exception;-- Attempt to add element when no space allocated private -- A link is made to a hidden data structure called DATA type DATA; type ESET is access DATA; NULL_SET:constant ESET := NULL; end SET_OF;