Question: Coding Assignment in JAVA For the problem statement below, you must write in java. Problem Statement: Write a program that reads every line in a

Coding Assignment in JAVA
For the problem statement below, you must write in java.
Problem Statement:
Write a program that reads every line in a text file, line by line. Obtain the name of the existing file and the name of the new (copy) of the file by prompting the user for both of these on the console. Make sure that the original file exists and can be read. If not, display a warning message and allow the user to either abort the program or enter a new file name. If the name of the new file to copy the text into already exists, then display a warning message and ask the user if they wish to overwrite the existing file or change the file name. If they wish to give a new name, then go through the same procedure as you did with the first name.
After you have copied the file successfully, you should display to the user the name of the original file that was copied and the name of the file it was copied to successfully.
(A sample file textfile.txt has been included along with this assignment in the dropbox to assist you in your programming)
Break the problem down and write in Java:
Break the problem statement into parts to fully understand what is expected as input, output and processes in your code. Write down all the variables you will need from the problem statement.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!