Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i need answer help me (Java Program) Java Lab - User Id and Password Entry Objective: The purpose of this project is to gain experience

i need answer help me (Java Program)

image text in transcribed

Java Lab - User Id and Password Entry Objective: The purpose of this project is to gain experience with the principles necessary to write a program using loops, menus and validation. The user will enter a user id and password, then the program will validate them according to our specifications. The user will keep being prompted to reenter until both are correct. After entering a valid user id and password, the Menu will redisplay. Instantiable class UserInfo: String userld String userPassword getters and setters Default constructor (your choice of default values) Parameterized/overloaded constructor (accepts both user id and password and sets them) Menu: The program will utilize a menu structure. Give an error message if the user doesn't choose a correct option, and redisplay the Menu. The Menu process should have its own loop, so that the only way the program should end is by user choosing the Exit option. Name your program class UserEntry Program. . Menu Option 1 - Create a new user: o Use a loop to prompt and validate for user id (must meet the following specifications): 6-10 letters followed by 2 numbers No white space (space or tab) or oth symbols Do not exit loop until user id is valid. User must get it right. Example: valid user would be android20, invalid would be android 20 (space) O Use a separate loop to prompt and validate for password (must meet the following specifications): 6-12 characters Must contain at least one number Must contain at least one upper case letter Must contain at least one lower case letter No white space (space or tab) or other symbols Do not exit loop until password is valid. User must get it right. Example: valid password would be Indianhills9, invalid would be indianhills9 (no uppercase letter) O After both user id and password are valid, instantiate a UserInfo object with the data (use the parameterized constructor). Do not instantiate this object right away like the previous project, but only after the data is entered and validated. o Display a message that the user information has been accepted, along with the user id and password that was entered. After the user presses Enter, the Menu should redisplay. Hint: use the getters to retrieve the user id and password. Menu Option 3 Exit program: When user chooses to exit, display your choice of termination message, paused on the screen. When user presses Enter, the program will then end. O Hint: Scanner nextLinel) can be used to pause the screen whenever needed

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

=+ Who do you think is right? Why?

Answered: 1 week ago