ExtraeditCrAssignment Solution



Introduction and Background

This is an extra credit assignment(So,someoneworthwith5%.a perfect score who could have 105 weighted points at the end, outIt ofis 100openpointstoanyonf but is completely optional.

The assignment is to implement some functionsIt‘shata operatelittl moreonC+ that you just write those specific functions:(Howeverwrote,Iwoualld theexpecte take more time than a lab session to complete.) Unlike a lab you no partnerships).

LikeA5,P this is a multi-file program with a MakefileW thatdid thatuses primsep give us the freedom to easily tfestrentyourtestcodriverusingthandiftheHopefullyonew

between the Makefile handouteek(readings15),the forrecentW lectures, and the feeling comfortable with multi-file C++ programs.


The filesboldinbelow are ones you modifyThe onesand submitnotin. bold are onesnotth modify.

ecListFuncs.h This contains the Node struct definition for our lin implementations), commented prototypes for the functions you few list utility functions you may want to use (the utility ecListFuncs.cpp Implementation file for the the list functionsStub rvequrs of the functions are already provided so you can compile the ectest.cpp Test program for yourThislistisfunctionsacommand.-based program, programs we used in lecture and lab to testYou linkedprobablylistwantcodeto and run the program right away to see what it does.

Makefile A file with rules for theThere”make”arecomcommentsand. at the top how to use it.

README See sectionSubmittingon your forpogrwhatm toBeforeputinyouit.start the please read thestatementfollowingwhich you will be “signing” in the R

“I certify that the work submitted for this assignment do codeIn. particular, the work is my own, not a collaboration, and by other people, with the exception of the resources expl Course SyllabusAndI.did not share my solution or parts of it course.”


Complete the implementation ofvectorToListthefive,countRunsfunctions,reverse,removeMiddle, and split, described in moreecListFuncsdetail.h. Nonein of the functions depe,and weon wiea each of them separately, so you can still get some extra credit by just im

12/1/2018 Extra credit assgt CS 455

The complete specification for these functions (i.e., prototypes ecListFuncs.h.You put your implementations ecListFuncsofthese.cppfunctions. in

W e provided a Makefile; to compile the code use the command:

make ectest


Unlike other programming assignments this one willAsbeusual,gradeditpri to come up with thorough testYoucaseshouldfor beyourablecodeto. try out all t driver providedectest.cpp().

The other evaluation criteria isFornotexample,wastingyouresourceswilllose. credit


should be an O(n) function),orifinyouO(nhave memory leaks, e.g., newby, doior reclaiming memory no longerThere areneededafew. additional restrictions on vectorToList andsplit — see function comments for details.

W e will not be evaluating your code on style, except that if yo evaluate the aspects mentioned in the previous paragraph(Iwouldyou wilho things like using good names and consistent indenting.)Youarearenotautomarequ write helper functions, but you are welcome to do so to increase

Note: you willno rececredivet for this assignment if the completed vers The stub versions currently do print a message — you should rem

READM E file/Submittingyourprogram

YourREADME file must document which of the functions you successful program (this might be in the form of test cases you tried, but other information .forIt mustthe graderalsocontaincertifictheationshowngednear the top o document.

The submit script will check that the necessary files are present no cout statements in your code.