Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 dayStep 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