ADT stack:set of elements of type elemtype (elemtype is used to refer to the type of the individual elements in a stack. Elemtype can potentially be any defined type * Operations: procedure initialise(var S:stack); This procedure assigns an empty stack to S. 完整的 procedure push(var S:stack;a:elemtype); Stack S should not be full.This procedure adds the element a at stack的 the top of the stack. procedure pop(var S:stack); Stack S should not be empty.The top element of the stack is ADT removed. function top(S stack):elemtype; Stack S should be non-empty and this function returns the top element of the stack S.The stack S is left unchanged.(If elem- type is a structured type,this function should be rewritten as a procedure,see note 1 of section 3.1.) function empty(S:stack):boolean; This function returns true if S is empty and false otherwise. function full(S stack):boolean; If S is full this function returns a true value. Otherwise it returns a false value.完整的 stack的 ADT