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
-
Create a java program using eclipse for each program description.
Program Instructions
-
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.
-
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.
-
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.
-
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.
-
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
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