全球旧事资料 分类
《数据结构》综合设计报告
队列的应用

一、需求分析二、编程与实现三、存在的问题与不足及对策四、对这门课的建议

f五、参考文献
教师评阅意见:
签名:成绩:



一、需求分析
本程序目的为利用队列对数据进行相关操作,实现队列的一种存储结构,利用队列的操作特点,借助进队与出队操作完成对杨辉三角的输出。
二、编程与实现1队列的定义
i
cludeiostreamhtemplateclassTstructLi
kNodeTdataLi
kNodeTli
kLi
kNodeLi
kNodeTptrNULLli
kptr
fLi
kNodeco
stTitemLi
kNodeTptrNULLdataitemli
kptrtemplateclassTclassLi
kedQueuepublicLi
kedQueuerearNULLfro
tNULLLi
kedQueuemakeEmptyboolE
Queueco
stTxboolDeQueueTxboolgetFro
tTxco
stvoidmakeEmptyboolIsEmptyco
stretur
fro
tNULLtruefalsei
tgetSizeco
stfrie
dostreamoperatorostreamosLi
kedQueueTQprotectedLi
kNodeTfro
treartemplateclassTvoidLi
kedQueueTmakeEmptyLi
kNodeTpwhilefro
tNULLpfro
tfro
tfro
tli
kdeleteptemplateclassTboolLi
kedQueueTE
Queueco
stTx
fiffro
tNULLfro
trear
ewLi
kNodeTxiffro
tNULLretur
falseelserearli
k
ewLi
kNodeTxifrearli
kNULLretur
falserearrearli
kretur
truetemplateclassTboolLi
kedQueueTDeQueueTxifIsEmptytrueretur
falseLi
kNodeTpfro
txfro
tdatafro
tfro
tli
kdeletepretur
truetemplateclassTboolLi
kedQueueTgetFro
tTxco
stifIsEmptytrueretur
falsexfro
tdataretur
truetemplateclassTi
tLi
kedQueueTgetSizeco
st
fLi
kNodeTpfro
ti
tk0whilepNULLppli
kkretur
ktemplateclassTostreamoperatorostreamosLi
kedQueueTQos
好听全球资料 返回顶部