Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a Java or C program (the choice is yours) for file processing according to

ID: 3649036 • Letter: W

Question

Write a Java or C program (the choice is yours) for file processing according to the following rules. The program requested for this project must have a text menu like this:

0 - Exit
1 - Select file
2 - Display
3 - Reverse
Select option:

The menu is displayed and the user must select an option (a number between 0 and 3). The action corresponding to the selection is performed, then the menu is displayed again and the user can choose another option. This cycle is repeated until the user selects 0, which exits the loop and ends the program.

The options are:

0 - Exit
This options ends the program

1 - Select file
The user is prompted for a file name. This is the first options that must be selected by the user. All the options below are working on the file selected here. After performing several operations on the selected file, the user can select another file and work on it.

2 - Display
This option displays the content of the selected file on the screen. If no file was selected an error message is displayed.

3 - Reverse
The file is read into memory, all of it in one buffer, and the buffer is reversed, then the file is overwritten. For simplicity, we may assume that the maximum size of the file is 200000 bytes. If no file was selected an error message is displayed.

Create a directory "H5" in your nova home directory and put all your files related to this assignment there. Also, submit the source code using the Assignment Folder in Webtycho under the H5 assignment.

Explanation / Answer

prog1.cc: In function `int main()': prog1.cc:49: error: `exit' was not declared in this scope prog1.cc:66: error: `exit' was not declared in this scope prog1.cc:81: error: `exit' was not declared in this scope prog1.cc:83: error: `malloc' was not declared in this scope

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote