08 2013 档案

摘要:#includeusing namespace std;const int maxqueue = 10;class Queue{public:Queue( );bool empty( ) const;Error_code serve( );Error_code append(const Queue_entry item);Error_code retrieve(Queue_entry item) const;protected:int front,rear;Queue_entry entry [maxqueue];bool is_empty; };Queue :: Queue( ){rear 阅读全文
posted @ 2013-08-29 18:23 傻蛋蛋 阅读(168) 评论(0) 推荐(0)
摘要:Error_code copy_stack(Stack &dest,Stack &source){ Error_code detected=success; Stack temp; Stack_entry item; while(detected==success&&!source.empty()}{ detected=source.top(item); detected=source.pop(); if(detected==success)detected=temp.push(item); }while (detected==success&& 阅读全文
posted @ 2013-08-29 18:22 傻蛋蛋 阅读(100) 评论(0) 推荐(0)
摘要:(a) 当n=3时,有五种 123, 132, 213, 312, 321 (b)当n=4时,有14种 1234, 1243, 1324, 1423, 1432, 2134, 2143, 3124, 3214, 4123, 4132, 4213, 4312, 4321 阅读全文
posted @ 2013-08-25 20:35 傻蛋蛋 阅读(129) 评论(0) 推荐(0)
摘要:1.大型程序的问题 problems large programs2.问题说明 problem specification3.程序设计 problem design4.数据结构的选择 choice of data structures5.算法分析 analysis ofalgorithms6.测试和验证 testing and verification7.程序正确性 program correctness8.维护 maintenance 阅读全文
posted @ 2013-08-20 22:34 傻蛋蛋 阅读(83) 评论(0) 推荐(0)