Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Your program should prompt the user for a password and then ask them to type it for the second time. After that, the program will

Your program should prompt the user for a password and then ask them to type it for the second time. After that, the program will validate the password meets the following criteria and respond with an error message if it does not or a "success" message if it passes.

  1. Initial password enter matches the re-typed password exactly. If violated, error message should be "Passwords do not match".
  2. The password must be between 8-20 characters exactly. If violated, error message should be "Password must be between 8-20 characters in length".
  3. The password must contain a capital 'Z' somewhere in it. If violated, error message should be "Password must contain a capital 'Z'".
  4. The last character of the password must be the digit '7'. If violated, error message should be "Password last character must be a '7'".

If the user enters a capital 'Q', then the program will quit. Otherwise, the user will continue to be prompted.

Your solution must have the following elements to get full credit:

  1. A loop construct
  2. At least one additional method besides the main() method.
  3. Well-named class, method and variable names (watch case!).
  4. Correct formatting (use CTRL-Shift-F key combination).
  5. The exact error messages you see in the requirements (also in the sample execution video below).

Java program in Eclipse

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

Step: 3

blur-text-image

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

The Accidental Data Scientist

Authors: Amy Affelt

1st Edition

1573877077, 9781573877077

More Books

Students also viewed these Databases questions

Question

Describe Table Structures in RDMSs.

Answered: 1 week ago