Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Finish writing Lab4.java below: Before you begin, DOWNLOAD the file Lab5.java from Canvas to your network drive (not the local hard drive or desktop). Once

Finish writing Lab4.java below:

image text in transcribedimage text in transcribedimage text in transcribed

Before you begin, DOWNLOAD the file Lab5.java from Canvas to your network drive (not the local hard drive or desktop). Once you have the file saved, open the file. From scratch, create a program to... -Display the parameters of a valid password - minimum of 8 characters that includes at least one digit and at least one of the following special characters. ! @ # $ * (DONE) -Ask the user for a password then make sure it is valid, following the parameters listed above -If the password is invalid, display one of the following error messages and loop until password is valid Invalid password - must be at least 8 characters Invalid password - must contain at least one digit Invalid password-must contain at least one of the following characters. ! @ # $ * (If more than one of these conditions are true, say less than 8 characters and no digit, you only need to display one of the appropriate error messages) -Once password is valid, confirm the password by having the user retype the password and comparing it to the originally entered password. If invalid, display an error message and loop until they type in the matching password. (For this lab, you do not need to allow them to re-enter a new password.) -Once passwords match, using StringBuilder, write the password to a text file called Lab5.txt, but use the following simple encryption write the ASCII value for each character, delimited by a comma. Write a 0 (zero) to indicate the end of the password. Hint: To convert a char to its ASC equivalent: int asciiVal = (int) ch; Before you begin, DOWNLOAD the file Lab5.java from Canvas to your network drive (not the local hard drive or desktop). Once you have the file saved, open the file. From scratch, create a program to... -Display the parameters of a valid password - minimum of 8 characters that includes at least one digit and at least one of the following special characters. ! @ # $ * (DONE) -Ask the user for a password then make sure it is valid, following the parameters listed above -If the password is invalid, display one of the following error messages and loop until password is valid Invalid password - must be at least 8 characters Invalid password - must contain at least one digit Invalid password-must contain at least one of the following characters. ! @ # $ * (If more than one of these conditions are true, say less than 8 characters and no digit, you only need to display one of the appropriate error messages) -Once password is valid, confirm the password by having the user retype the password and comparing it to the originally entered password. If invalid, display an error message and loop until they type in the matching password. (For this lab, you do not need to allow them to re-enter a new password.) -Once passwords match, using StringBuilder, write the password to a text file called Lab5.txt, but use the following simple encryption write the ASCII value for each character, delimited by a comma. Write a 0 (zero) to indicate the end of the password. Hint: To convert a char to its ASC equivalent: int asciiVal = (int) ch

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Database Modeling With Neo4j

Authors: Ajit Singh

2nd Edition

B0BDWT2XLR, 979-8351798783

More Books

Students also viewed these Databases questions

Question

Discuss the various types of policies ?

Answered: 1 week ago

Question

Briefly explain the various types of leadership ?

Answered: 1 week ago

Question

Explain the need for and importance of co-ordination?

Answered: 1 week ago

Question

Explain the contribution of Peter F. Drucker to Management .

Answered: 1 week ago

Question

3. What should a contract of employment contain?

Answered: 1 week ago

Question

1. What does the term employment relationship mean?

Answered: 1 week ago