COMP 1123 ASSIGNMENT 7

$30.00

Category: You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (2 votes)

Write the class Password which contains a constructor and 4 methods:
1. The shortPassword method returns a random String password which consists of 3 lower case letters.
2. The longPassword method returns a random String password of 25 characters. Each character in the password can be a lower case letter, upper case letter, or digit.
3. The nextPassword method returns a String password which consists of 3 lower case letters. This method has the property that if it is called enough times, it will return every possible 3 lower case letter passwords exactly once without repeating any. You can generate the passwords in any order. Once all the passwords have been generated, return “???”.
4. The reset method returns nothing. This method re-initializes things for the nextPassword method so that nextPassword can re-start generating passwords from the beginning.