Question: Unit 6 Assignment 2 Instructions Create a java program using eclipse for each program description. Program Instructions Ask the user to input a character. Use

Unit 6 Assignment 2

Instructions

  1. Create a java program using eclipse for each program description.

Program Instructions

  1. Ask the user to input a character. Use console input to get the character from the user. If the character is a digit, print The character you typed is a digit. If the character is a lower case letter, print The character you typed is a lower case letter. If the character is an upper case letter, print The character you typed is an upper case letter. If the character is not a digit or a letter, then print The character you typed is not a letter or digit.

  2. Ask the user to input a string. Use console input to get the string from the user. Find the index of the character in the middle of the string (the middle index is half the length of the string). Print out the character the middle index of the string.

  3. Ask the user to enter two strings. Use console input to get the strings from the user. Print out the two strings in alphabetic order using the compareTo method.

  4. Ask the user to enter a two strings. If the second string is a substring of the first string then print out The second string is a substring of the first string otherwise type The second string IS NOT a substring of the first string. If the second string is a substring of the first string then print out the start and end index for that substring in the original string.

  5. Amanda is 27. Franklin is 45. Debbie is 19. Use System.out.printf() and format specifiers to print out a formatted table for the user. One column should be the name of the person, the second table should be the age of the person.

    NAME AGE

    Amanda 27

    Franklin 45

    Debbie 19

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!