文档介绍:数学系计算机科学与技术专业实验报告学号 姓名余静娟一题目:按照你对顺序表操作的需要,重新改写主文件并运行,打印出主文件清单和运行的结果。一、程序(可打印)//(charname[10J;shortgrade;typedefstudentElemType;structLinearList(ElemType*list;intsize;intMaxSize;voidInitList(LinearList&L,intms);voidClearList(LinearList&L);intListSize(LinearList&L);boolListEmpty(LinearList&L);boolListFull(LinearList&L);voidTraverList(LinearList&L);boolFindList(LinearList&L,ElemType&item);boolUpdateList(LinearList&L,constElemType&item);boolInsertList(LinearList&L,constElemType&item,intmark);boolDeleteList(LinearList&L,ElemType&item,intmark);voidOrderOutputList(LinearList&L,intmark);booloperator==(constElemType&rl,constElemTyper2);booloperator<(constElemType&rl,constElemTyper2);ostream&operator«(ostream&ostr,constElemType&r);istream&operator»(istream&istr,ElemType&r);//#include<>#include<>#include<>#(LinearList&L,intms){=newElemType[msJ;if(!)(cerr«nEemoryallocationfaiure!n«endl;exit(l);=0;=ms;voidClearList(LinearList&L)(=0;}intListSize(LinearList&L)(;}boolListEmpty(LinearList&L)(==0;}boolListFull(LinearList&L){==;}voidTraverList(LinearList&L)(for(inti=O;;i++)cout«endl;boolFindList(LinearList&L,ElemType&item)(for(inti=O;;i++)if([i]==item)([i];returntrue;}returnfalse;}boolUpdateList(LinearList&L,constElemType&item)(for(inti=O;;i++)if([i]==item)([i]=item;returntrue;}returnfalse;}boolInsertList(LinearList&L,constElemType&itemjntmark)if(ListFull(L))returnfalse;if(mark>0){for(inti=-1;i>=O;i—)[i+l]=[i];[OJ=item;}elseif(mark<O)[=item;else(for(inti=O;i<;i++)if(item<[i])break;for(intj=-l;j>=i;j—)[j+l]=[j];[i]=item;}++;returntrue;}boolDeleteList(LinearList&L,ElemType&item,intmark)(if(ListEmpty(L))returnfalse;if(mark>0)(item=[O];for(inti=l;;i++)[i-l]=[