Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

1. What might have led to the misinformation?

Answered: 1 week ago