Comp 1123 Assignment 7 solution

$24.99

Original Work ?

Download Details:

  • Name: Assignment7-3odutf.zip
  • Type: zip
  • Size: 29.50 KB

Category: You will Instantly receive a download link upon Payment||Click Original Work Button for Custom work

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.