Write basic c++ code made with the following instructions:
Congratulations! You've been hired by the Fly-By-Night-Engineering-Company, Your new supervisor asks you to write a C++ program that will manage a list of robotic sensors, stored in an array of structs. This program will give you practice inputting data from files, writing and calling functions, using arrays and outputting data to a file. You should only use one array of structs.
The infotype in this problem will consist of a robotic sensor name (string), an ID number (string), an energy level (int), and a counter(int). New entries are added to the end of the array. Whenever an item is accessed by the FIND or MODIFY command, its counter is incremented by one.
Prompt the user to input the name of the data file. (5 pts) The input contains lines of the following format:
< data for processing the command>
commands are: INSERT, MODIFY, REMOVE, FIND, PRINT, EXIT
//----------------------------------------------------------------------------------------------------------------
INSERT will be followed by a name, ID number, and energy level.
(10 pts) Insert a new entry with the name, ID number, energy level, and zero counter to the end of the array
//----------------------------------------------------------------------------------------------------------------
MODIFY will be followed by a robotic sensor name and a new ID number
( 10 pts) Changes the ID number for the indicated name. Increment the counter.
//----------------------------------------------------------------------------------------------------------------
REMOVE will be followed by the name of the robotic sensor to delete from the array
(10 pts) removes the entry with the indicated name from the array
//----------------------------------------------------------------------------------------------------------------
FIND will be followed by the ID number to find in the list
(10 pts) print out the indicated name for the specified ID number. Increment the counter.
//----------------------------------------------------------------------------------------------------------------
PRINT (print) will have no additional data
(5 pts) Print the contents of the array; print name, ID number, energy level, and counter for each entry
//----------------------------------------------------------------------------------------------------------------
EXIT (exit) will have no additional data.
(10 pts) stop processing; do the following prints to the screen:
Use Selection sort to sort the array in order by name.
Print the entire list.
Print the list entries with a zero counter. (these were not Found or Modified)
Print the list entry with the largest counter. (this was the most accessed/altered user data)
In addition print the entire list to an output file.
Name the output file with your first and last name.
Notes:
1. Print a message if the name being searched for is not in the array.
2. Do not use global variables; pass parameters.
3. You should use functions to accomplish each task. You must have at least five functions.
4. Make sure that your output has a heading and is labeled.
Tips
You cannot just read the file and put each line into the array. You need to read the command on the line and then decide what needs to happen.