Question
Username Generator using java Write a program that asks a user for their first and last name (separately). The program then generates a username using
Username Generator using java
Write a program that asks a user for their first and last name (separately). The program then generates a username using the first letter of their first name, the first three letters of their last name and a random number between 100 and 999.
Note: Use the charAt and substring methods from the String class to construct the letter part of the user name.
Use the Random class to generate a number within the range.
A sample of the output is shown below:
Enter your first name: Sterling
Enter your last name: Archer
Username: SArc591
Tip: Assume that the user has a first and last name that is at least 3 letters long. Ticket Number Validation A ticket company is responsible for selling tickets for airlines, tours and other travel
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