14 Aug Java help
Create a new project
You will write three tests for Regular Expressions (REGEX)
- The user will enter an 8 digit Drexel ID. The REGEX will evaluate if it is valid or not. You can accept either 8 digits, or 6 digits followed by a hyphen, and then the last 2 digits.
Acceptable Drexel IDs values could be:
12341234
123456-78
- The user will enter a Drexel course code. The course code beings with two capital letters, followed by an optional hyphen, followed by 3 digits, and followed by an optional section number (which is a hyphen followed by 3 digits)
Acceptable Drexel IDs values could be:
CT290
CT370-609
EN-371
CS-412-515
- The user will enter a valid Drexel password based on the following algorithm: It must be at least 8 characters in length. It must have at least one capital letter. It cannot end with a number.
Acceptable Drexel password values could be:
Sparky47x
1234567X
Password (what a terrible password, but it’s acceptable)
ABC123xy
In the same project, ask the user (via Scanner readers) to enter their first name, middle name, last name, birth month, birth day (of the month), Drexel ID, Drexel Course Code, and Drexel password.
Check (via the REGEX you wrote in part 1) that the Drexel data is valid.
Write code that will save data to a file. The file will be named “Unit8.txt” When opened with a text editor, the file might read as follows:
|
Coded by: (Your Name) This file name: Unit8.txt First Name: Robert Middle Name: John Last Name: Watson Birth Month: 5 Birth Day: 28 Drexel ID: 343467-01 Drexel Course Code: MA-230-818 Drexel Password: SecretWord
|
Ask the user for the filename to save the code. So, instead of saving it to Unit8.txt, they could save it to MyProjectData.data
Write a REGEX that verifies that file name is only 8 characters, followed by a period, followed by a 3 letter extension. So, the above name of MyProjectData.data, would be wrong, but they could save it to a filed named MyData.dat
Include Exception Handling to verify that only digits are entered for the birth month and birth day.
Modify the Drexel Password checker to include at least one number in the password. Again, it cannot be the last character.
Create an email for this user. The email is their initials and the first three digits of their student ID. In the above example, the email created would be: RJW343. Report this in the printout.
If all of the extra credit is done, a possible printout would be:
|
Coded by: (Your Name) This file name: MyCode.inf First Name: Robert Middle Name: John Last Name: Watson Birth Month: 5 Birth Day: 28 Drexel ID: 343467-01 Drexel Course Code: MA-230-818 Drexel Password: DontAsk7z Drexel Email: RJW343
|
Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.
About Wridemy
We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.
How It Works
To make an Order you only need to click on “Place Order” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.
Are there Discounts?
All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.