Question: Implement a transaction-based linked list data structure using C++. The program will be interactive. Data transactions will be entered at the command line and results

Implement a transaction-based linked list data structure using C++. The program will be interactive. Data transactions will be entered at the command line and results will be displayed on the console.

  1. An alphabetized linked list of names will be created, updated and managed using Add, Delete, List and Reverse transactions. These transaction types will be processed as follows:
  • Add To add a name to the list, enter a transaction in the form of A, space, name (no spaces in the name). For example: A John. If the new name is not on the list it will be added such that the list of names is in ascending alphabetical order and the message name added will be displayed. If the name is already on the list, the name will not be added, and the message name not added will be displayed.
  • Delete To delete a name from the list, enter a transaction in the form of D, space, name (no spaces in the name). For example: D Joan. If the name is not on the list, the message name not found will be displayed. If the name is on the list, it will be removed and the message name deleted will be displayed.
  • List To display the names in ascending sequence, enter a transaction in the form L. Each name in the list will be displayed on a line by itself.
  • Reverse To display the names in descending sequence, enter a transaction in the form of R. Each name in the list will be displayed on a line by itself.
  • Quit To terminate the program, enter a transaction in the form of Q.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!