Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USE JAVA TO ANSWER THE QUESTION BELOW: Check The Password In this coding question, you are asked to implement the function check (char [] password)

USE JAVA TO ANSWER THE QUESTION BELOW:

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

Check The Password In this coding question, you are asked to implement the function check (char [] password) that takes a character array as a parameter and returns a boolean data type. Your task is to return true if the password is valid and return false if it is not. A valid password will adhere to the following rules: - The password must have at least 8 characters. - The password consists of only letters and digits. - The password must contain at least two digits. Below are some examples of some valid and invalid Below are some examples of some valid and invalid passwords: Note: - You are allowed to create new arrays, variables, and function but otherwise you are not allowed to create extra data structures to solve this problem(no ArrayList, etc). - Keep in mind that you can only return boolean values, i.e: true or false, if a password is valid or not. \begin{tabular}{|r|r|} \hline 1 & class javachallenge \{ \\ 2 & public static boolean check(char[] password) \{ \\ 3 & // Enter your code here \\ 4 & /* You do not need to worry about the return statement for the \\ 5 \\ 6 \end{tabular}

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

Concepts Of Database Management

Authors: Philip J. Pratt, Joseph J. Adamski

4th Edition

ISBN: 0619064625, 978-0619064624

More Books

Students also viewed these Databases questions