W6 Homework Assignment

1) Write a program that prompts the user to enter some input, which can be any sequence of arbitrary characters, such as 1er$^ #sdL';[3oD. Use a for-loop to iterate through each character in the input. Within the for-loop, use conditional logic (if-else if or switch) along with appropriate methods from the Character class (hint: look at the methods beginning with "is" to identify each character and determine whether it is:

When you run your program, it should produce output similar to that below (using the input above as an example). Hint: the format specifier needed to output a character is %c; to output a string, use %s.
 

Enter some input (anything): 1er$^ #sdL';[3oD

You entered 1er$^ #sdL';[3oD, which contains    16 characters. 

At index   0, the character 1 is a digit. 
At index   1, the character e is a lowercase letter. 
At index   2, the character r is a lowercase letter. 
At index   3, the character $ is something else. 
At index   4, the character ^ is something else. 
At index   5, the character   is white space. 
At index   6, the character # is something else. 
At index   7, the character s is a lowercase letter. 
At index   8, the character d is a lowercase letter. 
At index   9, the character L is an uppercase letter. 
At index  10, the character ' is something else. 
At index  11, the character ; is something else. 
At index  12, the character [ is something else. 
At index  13, the character 3 is a digit. 
At index  14, the character o is a lowercase letter. 
At index  15, the character D is an uppercase letter. 
Done.