Question: .Please solve all in JAVA IDs - Notepad File Edit Format View Help April4! March@3 June?6 A) (4 / 30 pts.) - Prior to prompting

.Please solve all in JAVA

.Please solve all in JAVA IDs - Notepad File Edit Format View

Help April4! March@3 June?6 A) (4 / 30 pts.) - Prior to

prompting for a new user ID, the existing list of user IDs

should be read and loaded to an array or arrayList. 1) Read

IDs - Notepad File Edit Format View Help April4! March@3 June?6 A) (4 / 30 pts.) - Prior to prompting for a new user ID, the existing list of user IDs should be read and loaded to an array or arrayList. 1) Read the list from "IDs.txt", a prompt is not necessary. Do not change this data file name "IDs.txt". 2) The existing list of user IDs should be displayed to the console (screen) according to this format. The first line is displays the title and current number of IDs. From the second line, the user ID is displayed. eg) List of User IDs(3) April4! Marche 3 June?6 B) (12 / 30 pts. ) - Upon prompting, the following checks must be made against an attempt to create a new user ID. 1) Duplicate IDs should be disallowed, and the user IDs are case sensitive. 2) IDs must be between 4 and 8 characters in length. 3) IDs must have lower-case AND upper case. 4) IDs must start with a letter like [a-z A-Z] 5) IDs must have at least one number like [0-9] 6) IDs must have at least one special character. 7) If the rules from 1-6 are violated, an appropriate error message informing the user should be displayed. i) The error message should display *all* the reasons why the ID is not correct. ii ) Do not display merely the first problem the program identifies (unless, of course, the first problem is the only problem). 8) When checking the length of an ID, "magic number" is not allowed. 9) When checking the letter, number and special character of an ID, "ASCII code" is not allowed. 10) ID consists of only one token. C) (6/ 30 pts.) - When a valid ID is provided, this ID should be written to an arry or arrayList and displayed back to console. D) ( / / 30 pts. ) - Finally, the "IDs.txt" datafile should be updated such that the new user ID appears should the program be run again. Remember this output file is the same as the input file. E) (-10 pts.) - Include appropriate program documentation and formatting including: 1) Your first and last name 2) Your contact information 3) Your student ID number 4) The date 5) A short description of the program's function 6) Comments necessary to explain the operation of your program 7) Proper indentation F) Save your file as "UserIDs.java" and upload to Canvas. II ) A Sample log of execution is as follow (user inputs are in bold and underlined): List of User IDs (3) Apri14! Marche 3 June? 6 Create a new ID: December! Invalid ID. ID too long. ID must have at least one number. Create a new ID: bellevuecollege Invalid ID. ID too long. ID must have at least one number. ID must have at least one special character. ID must have lower-case and upper-case. Create a new ID: April4! Invalid ID. ID already in use. Create a new ID: 4Julye Invalid Name. ID must start with a letter. Create a new ID: July_4 ID July_4 created successfully! List of IDs (4) April4! Marche 3 June? 6 July_4 1) You can use Character.isDigit(c) to check if c is a digit(=mumber), Character.isLetter(c) to check if c is a letter, Character.isUpperCase(c) to check if c is an uppercase and Character.isLetterOrDigit(c) to check if c is a letter or digit. 2) A magic number is a numeric literal that is used in the code without any explanation of its meaning. The use of magic numbers makes programs less readable and hence more difficult to maintain and update. Example: double pay =12.5 workedhours; what is the meaning of 12.5 ? It is better to define symbolic names, so called constants, and use these instead of numeric literals. definition of a constant PAY_PER_HOUR final double PAY_PER_HOUR = 12.5; now it is clear what PAY_PER_HOUR means double pay = PAY_PER_HOUR * workedhours

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!