Question: it is in C++ Your program should accept text from standard input and write all results to standard output. The user will provide instructions to

Your program should accept text from standard input and write all results to standard output. The user will provide instructions to your program by typing text at a command prompt. Any commands which do not have a specified function should simply echo the command name and the parameters. For example, "PAINT Rects" should output "Command: PAINTIn Param 1: Rect " (notice that the colons should line up making the output a little easier to read). You can assume that no command will have more than 8 parameters. Also, only the first four characters of any command should be considered significant and your program should recognize both upper and lower case commands. This means that PAINT, pain, Pain, and pAiNt are all equivalent. The user plans to store a list of rectangles and associated information. This will include data like name, coordinates, and color. You should support all of the commands given in the following table. DUMP > DUMP Rectl 8 12 20 10 green Dumps (prints) all data in the order it was inserted. Reet2 10 8 20 40 red Rect3 20 20 40 50 cyan Rect4 5 5 25 25 blue Finds the name if it exists. INSERT name lefi bortom right top color Stores the given rectangle in memory. ZOUND Kect TV 320 SU Red > PIND Reet CANNOT FIND "Rect9 > INSERT Rects 10 20 30 40 green ADDED "Regts INSERT Reet3 20 20 40 50 blue UPDATED Reet3" > LOAD testi LOADED "test" LOAD filename Loads commands from filename. (optional) REMOVE name Removes the given rectangle from memory. CANNOT OPEN test2 > REMOVE Rects REMOVED "Rects > REMOVE Rect? CANNOT REMOVE "Rect7 > QUIT Have a nice day! QUIT Quits the program [user@charon) The data should all be stored in memory using an external linked list. When INSERT is called, you should determine if the name is new or a duplicate. If it is new, then you should create a new node and add it onto the end of the external linked list. If it is a duplicate, then you should update the data in the corresponding node. DUMP should walk through the entire linked list from head to tail printing all data for each node. FIND should search for the node that matches a given name starting at the head of the list and print the contents of the node it finds. When REMOVE is called, you should remove the specified node from your external linked list and free any memory associated with the node. If you choose to implement the LOAD command, make sure that it reads one line at a time and processes cach line as if the user typed that line at the command prompt. The QUIT command should close all structures, clean up as necessary, and exit from the program. Checklist Output a command prompt when waiting for user commands Undefined commands should echo their name and parameters Make sure that you add all necessary commands from the table Your output should look similar to the samples in the table Command DUMP is important because it aids in testing your code Command INSERT is critical and must work if you want a grade Command FIND is relatively straightforward so add it next Command REMOVE is most likely to cause problems so be careful Command LOAD is optional so add it only if you have time Command QUIT should close all structures and exit
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
