LAB OVERVIEW

In this lab, you will create a program that allows a user to store login credentials. Your program will obtain user emails and passwords and will create a username and store them in parallel lists. Parallel lists allow you to store different types of related information in separate lists and reference them by the element ID.

Please note that each exercise below shows the program being run from the beginning. There is no need to repeat code for each exercise.

(1) Complete the getEmailAddress() function. This function has no parameters and returns a valid address. A valid email address is an address the contains both an "@" (ampersand) sign and a "." (period). If the user enters an invalid email address, the function should allow the user to re-enter a correctly formatted email address and loop until that correctly formatted address is received. We will not be concerned where the ampersand and periods are in the email address at this time. Remember to uncomment the function call in the main function.

Ex.

Login Verification Program
--------------------------

1. Enter new login credentials
2. Display login credentials
3. Exit Program
Enter selection:
1
Enter your email address:
marywilson.com
Your email address is invalid!
Please re-enter:
marywilson@gmail.com

(2) Complete the getPassword() function. This function has no parameters and returns a valid password. A valid password contains at least one capital letter, one numeric character, and is at least 8 characters in length. If the user enters an invalid password, the function should allow the user to re-enter a valid password and loop until a valid password is received. You are not required to notify the user of why the password is invalid. Remember to uncomment the function call in the main function.

Ex.

Login Verification Program
--------------------------

1. Enter new login credentials
2. Display login credentials
3. Exit Program
Enter selection:
1
Enter your email address:
marywilson.com
Your email address is invalid!
Please re-enter:
marywilson@gmail.com

NOTE: Passwords must be at least 8 characters in length
and must contain at least one uppercase letter and one number.
Enter your password:
abcdef
Your password is invalid!
Please re-enter:
abcdef123
Your password is invalid!
Pease re-enter:
Abcdef123

(3) Complete the getUsername() function. This function takes the email address as a parameter and returns a username. The username will consist of all of the characters preceding the ampersand. For example, if the email address is maywilson@gmail.com, then the username will be marywilson. Remember to uncomment the function call in the main function.

(4) Store each of the login credential items in their respective lists. Once this process is complete, display a confirmation message.

Ex.

Login Verification Program
--------------------------

1. Enter new login credentials
2. Display login credentials
3. Exit Program
Enter selection:
1
Enter your email address:
marywilson.com
Your email address is invalid!
Please re-enter:
marywilson@gmail.com

NOTE: Passwords must be at least 8 characters in length
and must contain at least one uppercase letter and one number.
Enter your password:
abcdef
Your password is invalid!
Please re-enter:
abcdef123
Your password is invalid!
Please re-enter:
Abcdef123

Credentials Saved!

(5) Complete the displayCredentialsReport() function. This function should take all 3 lists as parameters and produce a report of all of the available login credentials. You will simply need to create loop to iterate through the lists.

Ex.

Login Credential Report
-----------------------

Email Address Password Username
------------- -------- --------
marywilson@gmail.com Abcde123 marywilson
jjdan123@yahoo.com Bigboy1100 jjdan123
msreese@outlook.com Ginie#11 msreese

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.