(中秋节快乐)离散大家上机第2题(国外英文资料).docVIP

  • 11
  • 0
  • 约1.62万字
  • 约 44页
  • 2017-06-12 发布于河南
  • 举报

(中秋节快乐)离散大家上机第2题(国外英文资料).doc

(中秋节快乐)离散大家上机第2题(国外英文资料)

(中秋节快乐)离散大家上机第2题(国外英文资料) The header file Name of the class. H / / define the storage operator stack The class SeqStack { Public: SeqStack (int size); Virtual ~ SeqStack (); Bool Pop (); / / remove the top element of the stack Void Push (const char item); / / push in the stack Char Top (); / / return stack top elements Bool Clear (); / / remove the stack Boolean IsEmpty () const; / / determines if the stack is empty Int Size () const; / / the number of elements in the stack Private: Int maxSize; / / the maximum capacity of the stack Int top; / / stack top position Char * op; / / an array of operators }; / / the bool value stack that corresponds to the propositional element in storage The class IntStack { Public: IntStack (int size); Virtual ~ IntStack (); (const int factor); / / push in the stack Int Top (); / / return stack top elements Bool changTop (int item); / / change the top value of the stack Bool Pop (); / / remove the top element of the stack Bool Clear (); / / remove the stack Boolean IsEmpty () const; / / determines if the stack is empty Int Size () const; / / the number of elements in the stack Private: Int maxSize; / / the maximum capacity of the stack Int top; / / stack top position Int * intFactor; / / an array of operational factors }; / / The class Arry { Public: Arry (); ~ Arry (); Int, icp (char c) const; / / the priority order of the stack Int isp (char c); / / the priority order in the stack Bool whetherOP (char c) const; / / is it an operator Char compare (char c) const; / / take an operator and compare the top of the stack Bool getPostfix (); / / processing operator function, which gives the postfix expression Bool getPropotion (); / / find the single proposition element in the postfix expression Void BINadd (); / / binary Numbers are added once Const intnum 1, const intnum 2, const char op; / / calculate Bool getBool (); / / the bool value of the formula Bool prin (); / / output postfix expressions Void continueORend (); / / functio

文档评论(0)

1亿VIP精品文档

相关文档