[Solved] CMSC204-Project 1-A Password Checker

30 $

File Name: CMSC204-Project_1-A_Password_Checker.zip
File Size: 339.12 KB

SKU: [Solved] CMSC204-Project 1-A Password Checker Category: Tag:

Or Upload Your Assignment Here:


Project 1

Create a Java application that will check for valid passwords. The following rules must be followed to create a valid password.

  1. At least 6 characters (long)
  2. 10 or more characters is a strong password, between 6 and 9 characters is a weak (but acceptable) password
  3. At least 1 numeric character
  4. At least 1 uppercase alphabetic character
  5. At least 1 lowercase alphabetic character
  6. No more than 2 of the same character in a sequence

Hello123 – OK

AAAbb123 – not OK

Aaabb123 – OK

Academic Honesty Policy Reminder | Do your own work – each submitted project will be compared against other submissions from current and previous semesters.

requirements

  • When the application begins, the user will be presented with a screen that states the above instructions for creating a password, two text entry boxes for typing in a password, and three buttons. (See provided sample runs.)
  • If the user wants to check a single password, they will type in the password in both boxes and select the “Check Password” button.
  • If the user wants to read in and check a list of passwords, they will select the “Check Passwords in File” button, be presented with a file explorer, and select the file to read from. Those passwords that failed the check will be displayed, with their error message.
  • If the user presses the “Alt” key, a letter will be underlined in each button label. That letter is the “mnemonic” that can use as a shortcut (Alt plus the letter) to execute the button.
  • If the user hovers his cursor over a button, a tooltip will be shown.

Specifications

Data Element

  • String

Data Structure

  • ArrayList of Strings

Classes – Utility & Others

  • Create a PasswordCheckerUtility class based on the Javadoc given you. The PasswordCheckerUtility class will have at least three methods:
    • One method will check the validity of one password and return true if the password is valid and throw an exception if invalid.
    • One method will check for a “weak password”, i.e., one whose length is between 6 and 9, inclusive. Do NOT throw an exception.
    • One method will check an ArrayList of passwords and return an ArrayList with the status of any invalid passwords (weak passwords are not considered invalid). The ArrayList of invalid passwords will be of the following format:
      • <password><space><message of exception thrown>
    • The methods will have the following headers:
      • static boolean isValidPassword(String pwdString);
      • static boolean isWeakPassword(String pwdString);
      • static ArrayList<String> invalidPasswords(ArrayList<String> passwords);
    • Always check for the length of the password first, since that is the easiest and fastest check. Once the password fails one rule, you do not need to check the rest of the rules.

The GUI (Provided)

  • Buttons are provided to allow user to check validity of one password or a file of passwords
  • The user may be asked to enter the password and to re-type the password. If the two are not the same, the user is informed
  • A tool tip and a mnemonic are available for each of the buttons
  • A FileChooser asks the user to select the input file
  • Methods of PasswordCheckerUtility are used to process the passwords.
  • Try/catch structures catch exceptions thrown by PasswordCheckerUtility methods
  • Provided UI driver should work just fine, however, you are welcome to modify it or create your own. With that said, your project must satisfy (successfully passed) all of the specified requirements

Exceptions

  • Create exception classes for each exception listed in PasswordCheckerUtility Javadoc and listed below:
  1. Length of password is less than 6 characters (class LengthException)
  • Message – The password must be at least 6 characters long
  1. Password doesn’t contain an uppercase alpha character (class NoUpperAlphaException)
  • Message – The password must contain at least one uppercase alphabetic character
  1. Password doesn’t contain a lowercase alpha character (class NoLowerAlphaException)
  • Message – The password must contain at least one lowercase alphabetic character
  1. Password doesn’t contain a numeric character (class NoDigitException)
  • Message – The password must contain at least one digit
  1. Password contains more than 2 of the same character in sequence (class InvalidSequenceException)
  • Message – The password cannot contain more than two of the same character in sequence.
  1. For GUI – check if Password and re-typed Password are identical (class UnmatchedException)
  • Message – The passwords do not match
  • Throw this exception from the GUI, not the utility class.

Programming Concepts

This project utilizes the following concepts:

  • ArrayList
  • Tooltips
  • Mnemonic
  • Read Files
  • Javadoc
  • JUnit Tests
  • Exceptions
  • GitHub

GitHub

  • As you are working on your project, utilize your GitHub repro (upload your project files to a directory named Project1_Passwords. You will need to submit a screenshot of your repro during submission.

Testing

  • As a typical user, I should be able to utilize your program without running into too much difficulties! Thoroughly test your project
  • Think about the public and private test cases which your instructor will test your project against
  • If there are more than one errors in a password, use the order (as specified in the UI) to throw exceptions. For example, if a password is “xxyyzzwwaa”, it fails rules 2 and 4 above. Throw a NoUpperAlphaException, not a NoDigitException

File Format

The file will be in the following format: One password per line

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CMSC204-Project 1-A Password Checker
30 $