Question: ///////Help with Java ////// Write a program that gets input for a string, then output a substring of this string character by character showing the

///////Help with Java //////

Write a program that gets input for a string, then output a substring of this string character by character showing the upper case, lower case, initial case, binary, and hex values of each character. Repeat until quit.

Using

*Integer Types and Floating Point Types

*Char Type and ASCII Character Set

*Type Conversions

*Prefix/Postfix Modes for Increment/Decrement

*For loop header detail

*Hexadecimal, Octal, and Binary Numbers

Get input for a string containing both numbers and letters of any length Get input for a substring length (0 to quit) Use a for loop with postfix notation to increment through the string and printing the following: o Use a ternary operator (pg. 531) that sets the substring length to the actual string length if the value entered for the substring is longer than the actual string length o The initial digit/character o The ASCII value of each character o The ASCII value of each integer converted to a string Notice the columns for the char/int Hint: isdigit would work great for this. o The Hex value of each integer/character output in upper case Use the Integer wrapper class to convert to Hex Output Thank you for playing!

///////Help with Java ////// Write a program that gets input for a

sample output.

Please enter a string of any length: Ken123 ASCII int Hex Initial ASCII (char AB 101 65 110 6E 49 31 32 50 33 51 Thank you for playing

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!