Question: Your task for this assignment is to implement a linked list data structure in C + + . Implement a transaction - based linked list

Your task for this assignment is to implement a linked list data structure in C++.
Implement a transaction-based linked list data structure using a C++ object. The program will be interactive. A transaction will be entered at the command line after a short prompt and output will be displayed on the console display. Note: a batch of input transactions in a file can be processed using redirection.
A linked list of inventory part IDs, descriptions and prices will be created, updated and managed using Add, Remove and List transactions. The part ID with be any string value without spaces. The description with also be any string value without spaces. The price will be any double value in the range from .01 to 1000. You may assume transactions are formatted correctly. Transaction types will be processed as follows:
Add - To add a new part to the linked list, enter a transaction in the form of "A", space, part ID, space, description, space, price. For example: "A p01 battery 25". If the new part ID is not on the linked list, the part will be added. If the part ID is already on the linked list, the part will not be added. One of two messages will be displayed: (1) "part added" or (2) "error: part not added".
Remove - To remove a part from the linked list, enter a transaction in the form of "R", space, part ID. For example: "R w-123". If the part ID is on the linked list, the part will be removed. If the part ID is not on the linked list, the part will not be removed. One of two messages will be displayed: (1) "part removed" or (2) "error: part ID not found".
List - To display the part IDs, descriptions and prices in a numbered list, enter a transaction in the form of "L". Each output line will have a sequential number, part ID, description and price.
Quit - To terminate the program, enter a transaction in the form of "Q".
In this assignment, use the partially completed class called partList.h. You are to complete the methods add, exists and remove. Note: do not execute the exists method within the add and remove methods. Execute the exists method before executing the add or remove method.
 Your task for this assignment is to implement a linked list

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!