Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is to be done in C++ and a5.txt file that is needed This program is to implement a number of functions on a linked

This is to be done in C++

image text in transcribed

and a5.txt file that is needed

image text in transcribed

This program is to implement a number of functions on a linked list. 1. Insertion of a node to a linked list, by given criteria 2. Deletion of a node on a linked list, by given criteria 3. Search a node on a linked list, by given criteria 4. Sorting a linked list, by given criteria 4. Visit print out information (name and score) in each and every node on the linked list, from the first node to the last Node structure Info Field: Name (only one string, for simplicity) Score (an integer) Link: a pointer 1. Insertion criteria: a. b. The linked list insertion is based on alphabetical order of the given names. If a node on the list has the same name as the one that is to be inserted, then the existing one is deleted and the new one is inserted. 2. Deletion criterion For a given name, delete that name associated node from the linked list, if it exists. 3. Search criteria a. For a given name, search on the linked list if there is a node that has this name b. If found, print out the node info: Name and Score. One single line for each searched node c. If not found, print out "not found". d. The search process cannot change any info or node on the list. 4. Given a criterion, sort the linked in either ascending or descending order (1) The program reads command from a5.txt for actions (insertion, deletion, or search), and each command starts with % %SEARCH. %INSERT, %DELETE. %VISIT %SORTASC. %SORTDES. %END (2) Before each command starting with 96, the program must halt till the user enters a kev. The kev can be anvone on the kevboard. The "VISIT" command directs the program to print out information (name and score) in each and every node on the linked list, from the first node to the last. The "SORTASC is to sort the list according to the scores, in ascending order The "SORTDES is to sort the list according to the scores, in descending order The "END" command ends the program running, but not closing the window

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

Pro Database Migration To Azure Data Modernization For The Enterprise

Authors: Kevin Kline, Denis McDowell, Dustin Dorsey, Matt Gordon

1st Edition

1484282299, 978-1484282298

More Books

Students also viewed these Databases questions