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

prepare Java code to read and prepare 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 prepares 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 ex, 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 ex: 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.

Question A Why is it important to avoid the use of reserved words as you define variables, functions, methods, or identifiers? Do you have any get-arounds to the use of these reserved words that you like to use? (max 80 ...

Write a Java application using NetBeans Integrated Development Environment (IDE) that calculates the total annual compensation of a salesperson. Consider the following factors: A salesperson will earn a fixed salary of 8 ...

JAVA PROGRAMMING SCENARIO: A Mom and Pop used car dealership wants you to create a program that will manage their sales and inventory. They have provided a menu for you to follow. 1. Add To Inventory 2. Remove From Inven ...

When programming, or solving any sort of problem for that matter, abstraction plays a key role in the decision-making process. It allows you to remove irrelevant details in order to understand the bigger picture. For exa ...

Develop a console program for JAVA on Microsoft notepad that simulates a section of a restaurant menu. Each item will have a different price and your program should define at least ten items. You will need to obtain an o ...

Write a Java program (non-GUI preferred) to demonstrate the use of Iterator. The program should allow a user to do the following: Allow the reading of a collection of animal objects from an external file. Output on scree ...

IMPORTANT: use JGRASP for editing. Objectives - At the conclusion of this assignment students will have demonstrated that they can: Validate input data from a keyboard. Use loops to repeat actions in a program Use a Rand ...

JAVA programing essay Write a paper of 700-word response to the following: In your opinion, what are the three biggest challenges in planning and designing a solution for a programming problem? What can you do to overcom ...

Module Assignment: Introduction to Programming Using Java This assignment is to provide practice using arrays and strings along with other Java programming techniques discussed so far in the course. For this assignment, ...

4,153,160 Questions Asked

13,132 Experts

2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses,
Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.