Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

CLUJ Pui s Untitled) (1).pdf [Untitled] (1).pdf tv + 0 W file:///C:/Users/Okami/Downloads/[Untitled]%20(1).pdf - ox of 1 | 1 - + Fit to page Page view

image text in transcribedimage text in transcribedimage text in transcribed

CLUJ Pui s Untitled) (1).pdf [Untitled] (1).pdf tv + 0 W file:///C:/Users/Okami/Downloads/[Untitled]%20(1).pdf - ox of 1 | 1 - + Fit to page Page view | A Read aloud h Add notes 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 userid String userPassword 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 User Entry Program. en 1 Create new user: 1 Start your search Bt e L S 29% P A 0 ENG 5:40 PM Des [Untitled) (1).pdf [Untitled] (1).pdf tv file:///C:/Users/Okami/Downloads/[Untitled]%20(1).pdf 7 0 1 of lo - - ox Add notes * - + Fit to page Page view | A Read aloud 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 other 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) 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 Start your search ! Bi e - h the user id and L 29% A M ENG 5:40 PM 0 c .pui + v E DE Untitled (1).pdf [Untitled] (1).pdf file:///C:/Users/Okami/Downloads/[Untitled]%20(1).pdf - 0 of 1 X 0 o 1 6 B * - + Fit to page D Page view | A Read aloud hAdd notes 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 indianhills 9 (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: o When user chooses to exit, display your choice of termination message, paused on the screen. When user presses Enter, the program will then end. Hint: Scanner nextLine() can be used to pause the screen whenever needed - Start your search te @ L o 9 = 29%) 498 MENI 5:40 PM 0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions