BEST代写-线上编程学术专家

Best代写-最专业靠谱代写IT | CS | 留学生作业 | 编程代写Java | Python |C/C++ | PHP | Matlab | Assignment Project Homework代写

C++代写 | Lab 3: Singly-linked Lists

C++代写 | Lab 3: Singly-linked Lists

Lab 3: Singly-linked Lists
Using the given start project, implement the functions listed below by writing the declaration in the
AnyList.h file (where indicated) and the definition in the Functions.cpp file (where indicated).
• Function getMin
o Thefunctiontraversesthelistandreturnstheminimum(smallest)valuefound.Ifthe
list is empty, it will return 0.
o Assumption:Allvaluesaregreaterthanzero.
• Function haveThree
o o
o
Thisfunctionistakenfromcodingbat.com.
The function returns true if the value 3 appears in the calling list exactly 3 times and no
3s are next to each other. Afterimplementingandtestingyourfunction,analyzeyourcodeandmakesureitis efficient.
Example:
3, 1, 3, 1, 3 3, 1, 3, 3 3, 4, 3, 3, 4
=> true => false => false
• Function preFour
o Parameter:AnobjectoftheclassAnyList.
o (codingbat.com)Givenanon-emptysingly-linkedlist,thefunctioncopiesallelements
from the parameter list that come before the first 4 into the calling object.
o Assumptions:
 The calling object is empty.
 The parameter list contains at least one 4. Example:
Parameter object: 1, 2, 4, 1 Parameter object: 3, 1, 4 Parameter object: 1, 4, 4
=> Calling object becomes: 1, 2 => Calling object becomes: 3, 1 => Calling object becomes: 1
When testing your functions, make sure you comment/uncomment the appropriate sections in the .hxx files.
Do NOT modify any code given and do NOT add any additional functions and/or member variables.

bestdaixie