Computer Science homework help

Computer Science homework help. CS 116 Programming Project # 2
100 points
Your goal is to implement an application that reads a file, modify its content, and writes the modification back
to the same file. The file includes 2 lines of integers. The first line shows which item on the second line has
been selected (active). And the second line lists all the items in the list (maximum of 10).
Your application should have a menu that is constantly displayed on the screen (see the menu section below).
Right below the menu, the program should display the items in the list (second line). Also, it should show which
item is currently selected (active) by placing it within ( ).
The user should be able to select a menu item by entering its associated number.
“Insert” will insert an integer before the selected item and makes the newly inserted integer active. The integer
is typed by the user. If the list is full, insertion will not be possible.
“Delete” deletes the active item. If no more item to delete, display empty parentheses.
“Sort” sorts the list in ascending order. The active item after the sort is same as the active item before the sort.
“Select Right” selects the next item in the list. If the last item is selected, this option selects the first item in the
list.
“Select Left” selects the previous item in the list. If the first integer is selected, this option selects the last item
in the list.
“Move Right” moves the selected item one position to the right. If the last item is selected, moving right will
not be possible.
“Move Left” moves the selected item one position to the left. If the first item is selected, moving left will not be
possible.
“Exit” ends the application.
Make sure to use the top-down design to break your program to many simpler tasks (at least one function per
task)
Do not use global variables.
Make sure to check the special cases.
When starting the program, you should read the first number, save it into an integer, read the remaining integers
and save them into an array and close the file. When ending the application, you should write back everything
back in the same file before closing it.
Make sure to test your program completely before submission.
Do not forget to add comments.
Submit your well-documented C++ program via Canvas.
Menu:
1. Select Right
2. Select Left
3. Move Right
4. Move Left
5. Insert
6. Delete
4. Sort
8. Exit

Computer Science homework help