Question: Uppercase File Converter. Write a program that asks the user for the names of two files. The First file should be for reading and the

Uppercase File Converter. Write a program that asks the user for the names of two files. The First file should be for reading and the second file should be opened for writing. The program should read the contents of the first file, change all characters to lowercase, and store the results in the second file. Assume the first file contains more than one line. The pseudo code is given below.

Open the input file. Open the output file. while (inFile.hasNext()) { read a line from input file using inFile.nextLine(); convert it to uppercase using toUppercase()method; write it to the output file using outFile.println(.); } Close both files.

Input file input.txt example:

There are only two ways to live your life. One is as though nothing is a miracle. The other is as though everything is a miracle. Albert Einstein

Output file:

THERE ARE ONLY TWO WAYS TO LIVE YOUR LIFE. ONE IS AS THOUGH NOTHING IS A MIRACLE. THE OTHER IS AS THOUGH EVERYTHING IS A MIRACLE. ALBERT EINSTEIN

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!