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 transactionbased 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 to 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 space, part ID space, description, space, price. For example: A p battery 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: "part added" or "error: part not added".
Remove To remove a part from the linked list, enter a transaction in the form of space, part ID For example: R w 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: "part removed" or "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 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
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.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
