Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a Java program to create a new user ID that meets all of the following requirements. 1 ) Ask user to input a new
Write a Java program to create a new user ID that meets all of the following requirements.
Ask user to input a new user ID
The following checks must be made against an attempt to create a new user ID
ID must be between and characters in length. length and
ID must start with a letter like az AZ
ID must have at least TWO numbers.
ID must have at least one special character. tip: If a character is neither a letter nor a number, it is considered a special character
The first character and the last character of the ID must NOT be the same.
If the rules are violated, the user ID and error message should be displayed see example below and ask user to input new ID again.
When a valid use ID is provided, this user ID and appropriate message should be displayed, and your program stops. see example below
Requirements:
Six methods must be implemented. main method, a method to check the length, a method to check letter, a method to check number, a method to check special character, and a method to check firstlast character.
You must apply the concept of 'methodcallingmethod', 'parameter passing', and 'method that return values'.
You must apply the concept of good 'boolean zen',
MUST include
at least one space line before and after each while loop and for loop if any
at least one space line before if statement. At least one space line between each method
proper indentation
Your name and comments necessary to explain the operation of your program.
Sample log: user inputs are in bold and underlined
Input new ID: cs
cs is invalid.
Input new ID: aba
aba is invalid.
Input new ID: abcav
abcav is invalid.
Input new ID: ab
ab is invalid.
Input new ID: abca
abca is invalid.
Input new ID: abc?a
abc?a is invalid.
Input new ID: abc?abc
abc?abc is invalid.
Input new ID: abc?y
Congratulations! abc?y is created successfully.
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