Question Details

[solution] » Hello. I am trying to finish this but for some reason I am having

Brief item decscription

Step-by-step solution file


Item details:

Hello. I am trying to finish this but for some reason I am having
More:

Hello. I am trying to finish this but for some reason I am having a problem using "isdigit" to separate the ASCII value for a char and an int. This is the code I have already. If you don't want to tell me the answer, can you lead me in the right direction with an example. Thank you in advance. 

import java.util.Scanner;
//import java.util.ArrayList;
//import java.util.Collections;
public class LiFiUnit3Ch12
{
public static void main(String[] args)
{
Scanner scan = new Scanner(System.in);
System.out.print("Please enter a string of any lengh: ");
String initialString = scan.nextLine();
//Print header row
System.out.println("nInitaltASCIItASCIItHex");
//Loop through each string
for (int x=0; x{
//Print initial case initial character
System.out.print(initialString.charAt(x)+"t");
//Print ASCIIchar value
System.out.print((int)initialString.charAt(x)+"tt");
//Print ASCIIint value
System.out.print((int)initialString.charAt(x)+"tt");
//Print hex (upper case)
System.out.print(Integer.toHexString(initialString.charAt(x)).
toUpperCase());
//New line character
System.out.println();
}
}
//Method to pad strings to 8 characters
public static String padLeft(String inStr, int n)
{
String newStr = "";
for (int x=0; x{
newStr = newStr + "0";
}
return newStr+inStr;
}
}// end class

 







About this question:
STATUS
Answered
QUALITY
Approved
ANSWER RATING

This question was answered on: Feb 21, 2020

PRICE: $24

Solution~00072198.zip (18.37 KB)

Buy this answer for only: $24

This attachment is locked

We have a ready expert answer for this paper which you can use for in-depth understanding, research editing or paraphrasing. You can buy it or order for a fresh, original and plagiarism-free copy (Deadline assured. Flexible pricing. TurnItIn Report provided)

Pay using PayPal (No PayPal account Required) or your credit card. All your purchases are securely protected by PayPal.
SiteLock

Need a similar solution fast, written anew from scratch? Place your own custom order

We have top-notch tutors who can help you with your essay at a reasonable cost and then you can simply use that essay as a template to build your own arguments. This we believe is a better way of understanding a problem and makes use of the efficiency of time of the student. New solution orders are original solutions and precise to your writing instruction requirements. Place a New Order using the button below.

Order Now