Ask Question, Ask an Expert


Ask Java Expert

Home >> Java

Project Objective:

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

prepare Java code to read and prepare data to and from a file


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.


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.

Java, Programming

  • Category:- Java
  • Reference No.:- M94588

Have any Question? 

Related Questions in Java

Chapter 1 - challenge 3 - training workshopsyour company

Chapter 1 - Challenge #3 - Training Workshops Your company likes to present training workshops that help people in the information technology industry improve their skills. Your task is to write and object-oriented appli ...

Question 1 illustrate that the nodes of any avl tree t can

Question 1. Illustrate that the nodes of any AVL tree T can be colored "red" and "black" so that T becomes a red-black tree. Question 2. Illustrate that via AVL single rotation, any binary search tree T1 can be transform ...

Pogramming assignmentmickeymouse- x int- y int- size

Programming Assignment MickeyMouse - x : int - y : int - size : int -color: Color + MickeyMouse(): + setLocation (x: int, y: int): void + setSize (size: int): void + setColor(color: Color):void + draw(canvas: Graphics2D) ...

Assignmentupload your completed assignment to the

Assignment Upload your completed assignment to the Assignment 2 link on the course home page for marking and tutor feedback. Be sure to complete the final step-click on the Send for Marking button to notify your tutor. P ...

Write two java program by netbeans1 create a program that

Write two java program by Netbeans. 1. Create a program that ask for a radius of a circle and has the ability to return both the Area and Circumference - so methods call getArea() and getCircumferance() 2. Create a progr ...

The class below has some errors for each error do the

The class below has some errors. For each error do the following: a) Write the erring section of code and explain what the error is. b) Fix the error (i.e. re-write the code correctly). public class ClassWithErrors { pub ...

This assignment is based on the principles of clock

This assignment is based on the principles of clock consistency and associated drifts in a distributed system. You have to create a simulation, running on a single machine, of a simple distributed system involving four p ...

Part 1 text readingchapter 3 chapter 4 part 2 textbook

Part 1. Text reading Chapter 3, Chapter 4 Part 2 . Textbook questions Chapter 3. Describe why an application developer might choose to run over TCP rather than UDP. Suppose host A is sending host B a large file over a TC ...

Instructionsi what are the diagrams defined in the uml

Instructions I. What are the diagrams defined in the UML Standard. Give a one or two sentence description of each one. II. Given the following code, how should the toString methods in the classes H2ClassA and H2ClassB be ...

Java question1write an application that prompts a user for

JAVA Question 1. Write an application that prompts a user for a month, day, and year. Display a message that specifies whether the entered date is not this year, in an earlier month this year, in a later month this year, ...

  • 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.

Ask Now Help with Problems, Get a Best Answer

A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate