A successful new user registration requires the following valid data: ⦁   User name: it must start with...

80.2K

Verified Solution

Question

Programming

A successful new user registration requires the following validdata:

⦁   User name: it must start with a letter and consistof only letters and digits without any space character. User nameis case insensitive. Different users must have different usernames.
⦁   Password: it must have at least six characters,consist of only letters, digits, and special characters (@, #, $,^, &), and at least one upper-case letter, one lower-caseletter, one digit, and one special character.
⦁   First name: it must consist of only letters
⦁   Last name: it must consist of only letters
⦁   Email address: it must be a valid email address
⦁   Phone number: it must include three-digit area codeand seven digit phone number

Describe comprehensive acceptance criteria for the“register new user” and “login” user stories which uses thefollowing method names:

⦁   public String registerNewUser(String userName,String password, String reenteredPassword, String firstName, StringlastName, String email, String phone)

⦁   public UserAccount login(String userName, Stringpassword)

The acceptance criteria for “register new user” should considerwhether or not reenteredPassword matches password.

Answer & Explanation Solved by verified expert
4.2 Ratings (825 Votes)
Implementation in JAVAcodeimport javautilHashMapimport javautilScannerpublic class UsernamepasswordChecker map for Storing data static HashMap map newHashMap main method public static void mainString args Scanner s newScannerSystemin enter data from users SystemoutprintlnnRegister 1stuser n SystemoutprintlnEnter username String uname snext SystemoutprintlnEnter Password String pass snext SystemoutprintlnReRnterPassword String repass snext SystemoutprintlnEnter Fname String fname snext SystemoutprintlnEnter Lname String lname snext SystemoutprintlnEnter Email String email snext SystemoutprintlnEnter Phone String phone snext registernewuserunamepassrepassfnamelnameemailphone SystemoutprintlnnRegister 2nd user n SystemoutprintlnEnter    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students