Problem Statement

Implement the following flow chart in Java. You should have one Java file in the project called Homework1.java. The class should be called Homework1. see image.

The menu should contain the following options:

  • 1) Capitalize all words
  • 2) Lowercase all words

Sample Session

This is an example run of the program. The input and output files are shown after the code.

Please enter the input data file name:
input.txt
Please enter the output data file name:
Output.txt
Choose an option:
(A) Capitalize all words
(B) Lowercase all words
A
Process another file?
Y
Please enter the input data file name:
input.txt
Please enter the output data file name:
output2.txt
Choose an option:
(A) Capitalize all words
(B) Lowercase all words
B
Process another file?
n
Process finished with exit code 0

Output from session

Input file:

line One
linE two
Line Three

Output file for option A:

LINE ONE
LINE TWO
LINE THREE

Output file for option B:

line one
line two
line three
Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.