Question
PLEASE FOLLOW ALL STEPS USERNAME MUST BE 3-6 CHRACTERS WITH AT LEAST ONE NUMBER you will create a rudimentary (and highly insecure) database for the
PLEASE FOLLOW ALL STEPS USERNAME MUST BE 3-6 CHRACTERS WITH AT LEAST ONE NUMBER
you will create a rudimentary (and highly insecure) database for the storage of only the user generated identities. This program will have the following behaviors: (line break, 11 pt)
A) (4 / 30 pts. ) - Prior to prompting for a new username, the existing list of usernames should be read and loaded to an array.
1 ) Read the list from "users.txt", a prompt is not necessary.
2 ) The existing list of usernames should be written to the console. (line break, 11 pt)
B) (18 / 30 pts. ) - Upon prompting, the following checks must be made against an attempt to create a new username.
1 ) Duplicate usernames should be disallowed, and the usernames are case sensitive.
2 ) Usernames must be between 3 and 6 characters in length.
3 ) Username cant contain any space.
4) Usernames must start with a letter like [a-z A-Z]
5) Usernames must have at least one number like [0-9]
6) If the rules from 1-5 are violated, an appropriate error message informing the user should be displayed.
i ) The error message should display *all* the reasons why the username is not correct.
ii ) Do not display merely the first problem the program identifies (unless, of course, the first problem is the only problem). (line break, 11 pt)
C) (4 / 30 pts. ) - When a valid username is provided, this username should be written to an array and printed back to console. (line break, 11 pt)
D) (4 / 30 pts. ) - Finally, the "users.txt" database should be updated such that the new username appears should the program be run again.
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