Question: Write a program that creates a login username for a user, given the user's first name, last name, and a four-digit integer identification number as
Write a program that creates a login username for a user, given the user's first name, last name, and a four-digit integer identification number as input. A username is made up of the first five letters of the last name, followed by the first letter of the first name, and then the last two digits of the identification number (Hint: use the % operator to extract the last two digits of the identification number). If the last name has less than five letters, then use all letters of the last name.

Please answer in JAVA
Write a program that creates a login username for a user, given the user's first name, last name, and a four-digit integer identification number as input. A username is made up of the first five letters of the last name, followed by the first letter of the first name, and then the last two digits of the identification number (Hint: use the % operator to extract the last two digits of the identification number). If the last name has less than five letters, then use all letters of the last name. You will use if-else, modulo operator and string oprations such as substring to solve this problem. Follow "Programming Style Guideline", which is stored on D2L, while you are developing your program. Below shows an example execution of the program. > run xxxxxxxxxxxxxxxxxxxx: xxxxxxxxxxxxxxxxxxxxxxxxxxxxx The student's class information: Program Purpose: Create a login username xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx What are your first name, last name and 4-digit ID? Michael Jordan 1991 Michael Jordan with ID 1991 Your username is: Jordam91 Have a great day! > run xxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxx The student's class information: Program Purpose: Create a login username xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx What are your first name, last name and 4-digit ID? Kanye West 2024 Kanye West with ID 2024 Your username is: WestK24 Have a great day
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
