Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Java Programming Topic: Conditionals and Strings Assignment: Prompt the user for a/their first and last name (put this into a String object) Determine the number
Java Programming
Topic: Conditionals and Strings
Assignment:
- Prompt the user for a/their first and last name (put this into a String object)
- Determine the number of characters in the name
- Determine if the name is a Short name, average length name, or a long name (An average length name is 13 characters for the purpose of this assignment)
- Next the program needs to randomly pick a character between a and z. (use the Math.random() function)
- Now, determine if that randomly picked character appears in the name entered or not. (You should account for lower case and uppercase letters - so if the user entered Maurice Moss and the selected character was m, it should indicate that the character was found. )
Here is a sample run: (user entry is bolded)
Enter your first and last name AMITAVA KARMAKER Hello AMITAVA KARMAKER your name has 16 characters in it. You have a long name. Your name does contain the randomly chosen character of: m|M
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