Java application to read data from input file


Project Objective:

Effectively use the String, Character, and StringBuilder classes and associated methods.

Write Java code to read and write data to and from a file

Deliverables:

a) Design, develop, test and document the Java application which reads data from the input file, processes data, and then writes processed data to an output file

Specific functional requirements for this project:

a) The application must be run from command line using command line arguments to provide input and output filenames.

b) The application must display the suitable error message if user forgets to enter the input and output filenames at the command prompt or if the files are not found.

c) The application must open the file and read each line of the file.

d) For each line read, the application must find out the total number of characters in the line (including white-space characters), determine number of times the number 4 appears in the line, replace all occurrences of the string "this" with "That", and reverse the order of the characters in the line.

e) The output file must contain same number of lines as the input file with the following content for each line:

i) Total number of characters (including white-space characters) in the line

ii) Number of times the number 4 appeared in the line

iii) Reversed string (for example, cats in the input file would be displayed as stac)

f) The items on each line in the output file should be separated by commas (for example: for input line "this4cats", the output line should be "9,1,stac4tahT")

The application must close any open files before exiting.

Format:

Code Documentation and Style Requirements

The documentation requirement for all programming projects is one block comment at the top of the program containing the course name, the project number, your name, the date and platform/compiler that you used to develop the project. In addition, there must be at least one comment for each class in the program describing what that class does. Additional comments must be provided as essential to clarify the program.

Indentation should be consistent throughout the program. Variable and method names should be descriptive of the role of the variable or method. Single letter names should be avoided. All constants, except 0 and 1, should be named. Constant names should be all upper-case. Variable names should begin in lower-case, but subsequent words should be in title case (e.g., finalSpeed).

Separate compilation should be used in accordance with standard Java practice. Every class should be saved in a separate .java file.

Request for Solution File

Ask an Expert for Answer!!
JAVA Programming: Java application to read data from input file
Reference No:- TGS04588

Expected delivery within 24 Hours