Question
Asked by:
$25.00 Java application that reads data from an input file, processes the data, and then writes the processed data to an output
- From Computer-Science: Programming-Methods
- Closed, but you can still post tutorials
- Due on Dec. 13, 2008
- Asked on Dec 11, 2008 at 9:02:52PM
Q:Really lost on this chapter of programming looking for someone to build a program for me which I can use as a layout to build my own for this week of homework.
In this project, you will design, develop, test, and document a Java application that reads data from an input file, processes the data, and then writes the processed data to an output file.
* The application should be run from the command line using command-line arguments to provide the input and output filenames.
* The application should display an appropriate error message if the user forgets to enter the input and output filenames at the command prompt or if the files are not found.
* The application should open the file and read each line of the file.
* For each line read, the application should determine the total number of characters in the line, including white-space characters, determine the number of times the number 4 appears in the line, replace all occurrences of the string with , and finally reverse the order of the characters in the line.
* The output file should contain the same number of lines as the input file with the following content for each line:
o total number of characters, including whitespace characters, in the line
o number of times the number 4 appeared in the line
o reversed string (for example, in the input file would be displayed as )
The items on each line in the output file should be separated by commas (for example: for input line , the output line should be )
* The application should close any open files before exiting.
(Please use remarks to explain which area's are of what. I have already built a program that has some of the following, but I am lost regarding the command line and the string variables. If you want a copy of my program just e-mail me and I will send it. But I prefer if you didn't use my own work, because I wish to submit my own work not someone else's.)
To which Exera said: replace all occurrences of the string "this" with "That" Sorry, didn't see that. Does this example of yours have all the following once you fix this? Thank you for the help.



