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!
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 playingStep 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