Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions

Question

Why is it important to analyze your spending habits?

Answered: 1 week ago

Question

What will start-up costs be?

Answered: 1 week ago

Question

Prove that (R 2 , U) is second countable.

Answered: 1 week ago