Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C++ I need examples of these types of methods which are to be added to an application. 1) searchVal(item:int): bool - method searches a

In C++ I need examples of these types of methods which are to be added to an application.

1) searchVal(item:int): bool - method searches a Linked List for an item. This method returns a true if the value is found in the linked list or false if not.

2) countFrequencyOf(item: int): int - method returns the count of items in the list, returns 0 if none

3) size(): int - method returns the number of items in the list. need to add a counter to your program to increase by 1 as items are added to the list.

4) displayFromFrontToN(n: int) :void - method will display all elements of the list from the head pointer to the nth element or to the end whichever comes first

5) displayFromNToEnd(n : int):void - method will display all elements of the list from the nth element to the end of the list, make sure to check that n is realistic for your list

6) insertInOrder(n : int) : void - method will insert n into the linked list in it's proper order - HINT: this method does require the use of two pointers, you need to keep track of the two nodes to insert between.

7) fillListFromFile( ) : void - method will add elements to the list from this file linkedListData1.txt. This is where you will keep track of the number of elements in the list

8) displayInRows() : void - method displays the linked list in rows of 10 elements - use a counter when you display the values, when the counter reaches 10 output a " " and reset your counter - columns will be a good idea here Demonstrate the above functions in your main() function.

Notes: Not all functions developed in class will be utilized in the final application. Update your delete functions to alter the size attribute of the list.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning Databases With PostgreSQL From Novice To Professional

Authors: Richard Stones, Neil Matthew

2nd Edition

1590594789, 978-1590594780

More Books

Students also viewed these Databases questions

Question

How flying airoplane?

Answered: 1 week ago