Question: 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

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!