subject

Goals: Create your own linked list.
Perform basic linked list operations.
Requirements:
Write a program that implements and demonstrates a linked list using functions. Your program should first define a node that stores an integer and then your program will include the following functions:
append() - This function accepts the head pointer (by reference) of a linked list and an integer as it's only arguments. It then creates a node, stores the integer argument in the node, and adds it to the end of the list.
find() - This function accepts the head pointer (by value) of a linked list and an integer to search for in the list as it's only arguments. It then searches the list for the first occurrence of the integer argument. If it finds it, it returns true. If it doesn't, it returns false.
clear() -- This function accepts the head pointer of a linked list (by reference) as it's only argument. It then removes all the nodes of the linked list from memory by deleting them one at a time. The function leaves the head pointer set to nullptr.
print() - This function accepts the head pointer of a linked list (by value) as it's only argument and then displays on the screen all the integers stored in the list.
Demonstrate your functions by adding 5 numbers to the linked list. Then, print the list. Then search the list for a value and then indicate the result. Finally, print the list one last time.
The only functions that interact with the user is the print() function (and main()). No other functions contain cin or cout statements.
Use the posted algorithms on Canvas to guide you. You need merely translate them to C++. Translating the pseudocode into C++ is a major portion of the assignment! The previous labs have included sample pseudocode to prepare you for this. If you skipped the labs, well, you may be in trouble.
The sample code in the text will be of very little use. The sample code in chapter 17 is based on classes which are not covered in this course. if your solution includes classes, I will give you 0 points for your submission. I'm asking you to write functions, not classes.
Notes:
Your solution will receive major penalties for memory leaks.
This assignment is a "capstone" assignment where you will demonstrate your accumulated knowledge over the semester.
A 20-Point Sample Run:
The first line contains all the integers of my list after appending them.
The second line is the result of my find function searching for 68.
Hints:
Make sure you understand pointers and dynamic memory allocation.
Write your print() function first, it will help in testing.
Write one function at a time.
Use hand-tracing to hunt down any errors.
If your program crashes, it is almost certainly because you are dereferencing an invalid memory location which is the result of a logic error.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 12:40
The most complicated four letter word
Answers: 1
question
Computers and Technology, 22.06.2019 19:00
In he example code, what does the title attribute create? a tool tip an element a source a markup
Answers: 1
question
Computers and Technology, 24.06.2019 15:50
Subscribe to j p g a m e t u b e on you tube ?
Answers: 2
question
Computers and Technology, 25.06.2019 00:00
Into which of these files would you paste copied information to create an integrated document? a. mailing list b. destination c. source d. data source
Answers: 1
You know the right answer?
Goals: Create your own linked list.
Perform basic linked list operations.
Requirements:...
Questions
question
English, 25.09.2019 23:10
question
Mathematics, 25.09.2019 23:10
Questions on the website: 13722363