Question: Mimir FRQ unit 5 Properly declared attributes as defined above A properly defined variable called invalidPasswords to track the total number of invalid passwords accross

Mimir FRQ unit 5

  • Properly declared attributes as defined above
  • A properly defined variable called invalidPasswords to track the total number of invalid passwords accross all instances of the Account class
  • A private helper non-instance (static) method called isValidPassword that takes a String parameter representing a password and returns true if it meets the requirements for a valid password and false otherwise
  • The default constructor which assignes the values: fullName as "J Doe" and password as "abc123&Z"
  • The overloaded constructor which uses the helper method to validate the desired password passed to it. A valid password will be accepted. An invalid password will result in the password attribute being null and the count of invalid passwords being increased by one.
  • The getter method getInvalidPasswordCount which returns the number of invalid passwords accross all instances
  • The setter method setPassword which updates the password attribute if the parameter is valid or leaves the password unchanged and increases the count of invalid passwords by one. This setter method also returns true if a new password has been accepted and false otherwise
  • The getPassword method which returns an obscured version of the stored password
  • The checkPassword method which takes a passwordAttempt as a parameter and returns true if the attempt matches the stored password
  • The toString method which returns a String with the Full name and obscurred passwordMimir FRQ unit 5 Properly declared attributes as defined above A properly

Unit 5 FRQ Exam / 1. Problem 1: The Account Class saved 9 points possible Reset to Starter Code Complete the Account class by following the directions in block comments for: Properly declared attributes as defined above A properly defined variable called invalidPasswords to track the total number of invalid passwords accross all instances of the Account class A private helper non-instance (static] method called isvalidPassword that takes a string parameter representing a password and returns true if it meets the requirements for a valid password and false otherwise The default constructor which assignes the values: fullName as "J Doe" and password as "abc12362" The overloaded constructor which uses the helper method to validate the desired password passed to it. A valid password will be accepted. An invalid password will result in the password attribute being null and the count of invalid passwords being increased by one. The getter method getInvalidPasswordCount which returns the number of invalid passwords accross all instances The setter method setPassword which updates the password attribute if the parameter is valid or leaves the password unchanged and increases the count of invalid passwords by one. This setter method also returns true if a new password has been accepted and false otherwise The get Password method which returns an obscured version of the stored password The checkPassword method which takes a passwordAttempt as a parameter and returns true if the attempt matches the stored password The toString method which returns a string with the full name and obscurred password Save Grading 9 Run Tests O Full Screen 1. Test Attributes Not run NOT RUN 2. Static Method Unit Test: isValidPassword Not run NOT RUN 3. Default Constructor Unit Test Not run NOT RUN Account.java + New 1 public class Accour 2-{ 3 /** Constants containing each character for each required group to make a valid password */ 4 public static final String DIGITS "0123456789"; 5 public static final String LOWER_ALPHA "abcdefghijklmnopqrstuvwxyz"; 6 public static final String UPPER_ALPHA "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; 7 public static final String OTHER_CHARS "!@#$%^&*(),.?/"; 8 9 /** Combines the groups into a single constant */ 10 public static final String VALID_CHARS = DIGITS LOWER_ALPHA + UPPER_ALPHA OTHER_CHARS; 11 12 /** A constant representing the minimum password length */ 13 public static final int MIN_PASSWORD_LENGTH = 8; 14 15 /** An account has two attributes: fullName and password */ 16 /* Properly declare the attributes */ 17 18 /** The account class keeps track of how many accounts have invalid password 19 accross all instances of the Account class in the variable invalidPasswords 20 */ 21 /* Properly declare invalidPasswords */ 22 23- /** The isValidPassword method is a private static helper method. 24 4. Overloaded Constructor Unit Test Not run NOT RUN 5. Instance Method Unit Test: getinvalidPasswordCount Not run NOT RUN 6. Instance Methods Unit Test: setPassword Not run NOT RUN 7. Instance Methods Unit Test: getPassword Not run NOT RU

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!