subject

Write a program that replaces each line of a file with its reverse.
For example, if you run java Reverse HelloPrinter. java Create the output as HelloPrinterReverse. java. If the file HelloPrinter. java contains the text public class HelloPrinter { public static void main(String[] args) { // Display a greeting in the console window System. out. println("Hello, World!"); } } ?? then the contents are changed to retnirPolleH ssalc cilbup { )sgra ][gnirtS(niam diov citats cilbup { wodniw elosnoc eht ni gniteerg a yalpsiD // ;)"!dlroW ,olleH"(nltnirp. tuo. metsyS } } If there is a blank line in the input file, do not print it in the output file. If you run Reverse twice on the same file, you get back the original file.
Create the output file as HelloPointerOriginal. java java Reverse HelloPrinterReverse. java If the input file doesn’t exist, throw the message "Input file not found. Please check an rerun the program". Allow the user to enter the input file one more time. If the user enters an invalid file again, terminate the program. Use a try... catch statement.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 02:10
3. (5 points) describe what would be printed by the code below or what error would occur. const char* cstr = "0123456"; const char* ptr = & cstr[4]; cout < < ptr[-1] < < ptr < < endl; 1 4. (5 points) theseus has been trapped in a maze with a minotaur, which is trying to capture him. each round, theseus and the minotaur move through the maze; theseus towards the exit, and the minotaur towards theseus. theseus can move in any of the four cardinal directions, or he can wait for a round to see how the minotaur moves. write code that creates a data type to represent the possible moves that theseus could make.
Answers: 3
question
Computers and Technology, 22.06.2019 16:30
Corey set up his presentation for delivery to his team.the information he had to convey was critical to their job performance.he knew he would need a lot of time to explain each point
Answers: 3
question
Computers and Technology, 22.06.2019 19:40
Solve the following javafx application: write a javafx application that analyzes a word. the user would type the word in a text field, and the application provides three buttons for the following: - one button, when clicked, displays the length of the word.- another button, when clicked, displays the number of vowels in the word.- another button, when clicked, displays the number of uppercase letters in the word(use the gridpane or hbox and vbox to organize the gui controls).
Answers: 1
question
Computers and Technology, 23.06.2019 17:30
Write pseudocode to represent the logic of a program that allows the user to enter a value. the program multiplies the value by 10 and outputs the result.
Answers: 1
You know the right answer?
Write a program that replaces each line of a file with its reverse.
For example, if you run j...
Questions
Questions on the website: 13722367