Can you please help me in Java? Thank you! 4.33 Clone of PRACTICE: Loops*: Password requirements Websites
Fantastic news! We've Found the answer you've been seeking!
Question:
Can you please help me in Java? Thank you!
Transcribed Image Text:
4.33 Clone of PRACTICE: Loops*: Password requirements Websites commonly require a password that satisfies several requirements. Write a program that checks if an input string satisfies the following (error message is shown for each): • At least 8 characters (Too short) At least one letter (Missing letter) At least one number (Missing number) • At least one of these special characters: 1, #, % (Missing special) Output OK, or all related error messages (in above order). If the input string is "Hello", the output is: Too short Missing number Missing special Hints: • Declare a boolean variable for each requirement. • Use a for loop to visit each character, setting the corresponding boolean to true if satisfied (length is done differently though). • Use the functions Character.isLetter() and Character.isDigit() to detect if a character is a letter or a number. 367056 2516260.axmay LAB 4.33.1: Clone of PRACTICE: Loops: Password requirements ACTIVITY 1 import java.util.Scanner; 3 public class Main ( 1234567 void Scanner scnr- new Scanner(System.in); /Type your code here. / Main.java 0/6 Load default template.... 4.33 Clone of PRACTICE: Loops*: Password requirements Websites commonly require a password that satisfies several requirements. Write a program that checks if an input string satisfies the following (error message is shown for each): • At least 8 characters (Too short) At least one letter (Missing letter) At least one number (Missing number) • At least one of these special characters: 1, #, % (Missing special) Output OK, or all related error messages (in above order). If the input string is "Hello", the output is: Too short Missing number Missing special Hints: • Declare a boolean variable for each requirement. • Use a for loop to visit each character, setting the corresponding boolean to true if satisfied (length is done differently though). • Use the functions Character.isLetter() and Character.isDigit() to detect if a character is a letter or a number. 367056 2516260.axmay LAB 4.33.1: Clone of PRACTICE: Loops: Password requirements ACTIVITY 1 import java.util.Scanner; 3 public class Main ( 1234567 void Scanner scnr- new Scanner(System.in); /Type your code here. / Main.java 0/6 Load default template....
Expert Answer:
Answer rating: 100% (QA)
Mainjava Java program that reads a string as input and checks if all the conditions for valid passwo... View the full answer
Related Book For
Managing the Law The Legal Aspects of Doing Business
ISBN: 978-0133847154
5th edition
Authors: Mitchell McInnes, Ian R. Kerr, J. Anthony VanDuzer
Posted Date:
Students also viewed these programming questions
-
Can you please help me with this question? Explain health care spending in each region of the state in 2013 a. Using the data listed below (in millions), calculate the percentage change for average...
-
Please help me in both questions, thank you very much :)
-
Match the following organisms to their role(s) in the food web shown below. Rabbits Carrots Foxes Mice Grasses (Not drawn to scale) Onts Grasshoppers Birds Grains
-
Help Mad Mildred's Magic Mall by determining the missing values in the table Labor (workers/day) Output (units/day) Total fixed cost ($/day) Total variable cost ($/day) Total cost ($/day) 50 50 50 75...
-
Employee earnings records for Redding Company reveal the following gross earnings for four employees through the pay period of December 15. D. Edwards ........... $83,500 A. Seligman...
-
If a body slides on a surface, it experiences friction F (a force against the direction of motion). Experiments show that |F| = |N| (Coulomb's law of kinetic friction without lubrication), where N is...
-
The adjusted trial balances of PDQ, Inc., at December 31,2010, and December 31, 2011, include these amounts: Requirement 1. Compute the amount of supplies expense, salary expense, and service revenue...
-
Dublin Chips is a manufacturer of prototype chips based in Dublin, Ireland. Next year, in 2018, Dublin Chips expects to deliver 615 prototype chips at an average price of $95,000. Dublin Chips'...
-
Analyze the complexities of urban infrastructure planning and design, considering factors such as population growth, land use dynamics, and climate change resilience, and discuss innovative...
-
As she headed toward her boss's office, Emily Hamilton, chief operating officer for the Aerocomp Corporation-a computer services firm that specialized in airborne support-wished she could remember...
-
8.27 The following data is obtained for the velocity of a vehicle during a crash test.: 40 |:| 10 t (ms) v (mph) 0 30 10 29.5 20 28 30 23 50 5 60 2 70 0.5 80 0 If the vehicle weight is 2,400 lb,...
-
It is argued that there are no incentives for firms to move from Nash equilibrium because they do not want to be worse off. Given this background, what are the benefits of attaining Nash equilibrium?...
-
Discuss how the Federal Reserve Bank controls the money supply. How does it expand or contract the money supply? Integrate Biblical principles. Does it appear that the Federal Reserve Bank believes...
-
Analyze the effects of a positive technology growth rate on the growth rate of capital per worker.
-
At the beginning of a session Stan asked the therapist:" I have been wanting to contact my ex-wife, and I am wondering if this would be a good idea? What do you think? As his therapist, how would you...
-
Egg mass = 0.5 kg time of fall = 0.02 seconds drop height = 2 m Calculate the Potential Energy of your egg-trapment (with the egg) using the equation PE = mgh What is the Kinetic Energy of the egg...
-
53) You have the following rates of return for a risky portfolio for several recent years. Assume that the stock pays no dividends. Year 2018 2019 2020 2021 Beginning of Year Price $60 $65 $61 $64 #...
-
Cornell and Roberts are partners who agree to admit Stanley to their partnership. Cornell has a capital balance of $80,000 and Roberts has a capital balance of $120,000. Cornell and Roberts share net...
-
Canaural Inc was a small Canadian company that manufactured audio components. Until recently, the brains behind the operation were two key employees: Jurgen Ballack and Karl Heinz. DeutscheSonic GmbH...
-
Name five forms of expression protected by copyright and give examples of each.
-
As an online service provider in Newfoundland and Labrador, describe how you can shield yourself from possible liability as an online intermediary.
-
In your year-end audit of The Joshua Redman Co., a defense contractor specializing in building sophisticated tracking systerns for missile defense systems, you bring in a specialist, Mal Waldron, to...
-
Specialists may be required to perform audit tasks that require knowledge or skills outside the auditor's abilities. Examples from the text include an engineer (to verify the stage of completion of...
-
Consider the internal audit staffs of the following two companies: Carl Company's internal auditors are college graduates who have been hired mostly from the ranks of marketing personnel who did not...
Study smarter with the SolutionInn App