write a program that accepts a single command line argument, either -echo, -author, or -help. If the
Question:
write a program that accepts a single command line argument, either -echo, -author, or -help. If the command line argument is -author, the program prints your name, followed by a new line, and exits. If the command line argument is -help, the program prints the help message here: "Usage: echoer [-echo,-author,-help]", followed by a new line, and exits. When run with the -echo argument, the program prompts the user for a long string of characters (possibly multi-line) and exits with an EOF. Once the program reaches the end of the input, your program should then output the total length of the input (excluding the newline characters ' ') as a single number on a new line, accurately reflecting the user's input (including spaces, newlines, etc.).
Java An Introduction To Problem Solving And Programming
ISBN: 9780134462035
8th Edition
Authors: Walter Savitch