Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a java program that prompts the user to create a new password with at least one uppercase letter, one lowercase letter, and one digit.

Write a java program that prompts the user to create a new password with at least one uppercase letter, one lowercase letter, and one digit. The password must have a length of 5. If the password violates on of these rules, tell the user which error has occurred. If the password is good, display a message that the password has been changed.

Sample run:

Enter your new password: xnyp8 Your password should contain one uppercase letter.

Enter your new password: treaT Your password should contain one digit.

Enter your new password: mX4dt Your password has been changed.

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

Relational Database And SQL

Authors: Lucy Scott

3rd Edition

1087899699, 978-1087899695

Students also viewed these Databases questions