Question
Need help with creating Java program. Write a program that asks for a username, converts the letters of the username to the upper case letters,
Need help with creating Java program.
Write a program that asks for a username, converts the letters of the username to the upper case letters, creates a text file Origin.txt and writes the username to it. Then read the file Origin.txt, and print out a greeting message with the username. So an example would be the user enters a username Proto then the output would be "Hello, PROTO, how is your day today?. Then create a text file Draft.txt, write the greeting message to it, copy the file Draft.txt, and write to the same location with a different name Final.txt. In the segment, show how to copy an input file character by character. Your program should display an appropriate error message when the user enters invalid file name. It should ask the user to re-enter the file name, and repeat the process until the user enters valid input. In order to check if the program works, ask the user to enter the the file name, and print out the content in order to see if "Final.txt" was copied from "Draft.txt". by entering "Final.txt".
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started