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

Mimir FRQ unit 5-full directions

  • 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-full directions Properly declared attributes as defined above Aproperly defined variable called invalidPasswords to track the total number of invalidpasswords accross all instances of the Account class A private helper non-instance

Unit 5 FRQ Exam / 1. Problem 1: The Account Class Saved Reset to Starter Code 9 points possible What you need to know: You will complete the Account class. An account has two String attributes: fullName and password The account class also keeps track of how many accounts have invalid passwords. This information is stored in the variable invalidPasswords. You will complete a static helper method, two constructors, and selected getters and setters. Instructions: 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 get InvalideasswordCount 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 Unit 5 FRQ Exam / 1. Problem 1: The Account Class Saved Reset to Starter Code 9 points possible What you need to know: You will complete the Account class. An account has two String attributes: fullName and password The account class also keeps track of how many accounts have invalid passwords. This information is stored in the variable invalidPasswords. You will complete a static helper method, two constructors, and selected getters and setters. Instructions: 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 get InvalideasswordCount 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 v Grading 9 Run Tests O Full Screen 3. Default Constructor Unit Test 0/1 pts - Click for details FAILED 4. Overloaded Constructor Unit Test 0/1 pts - Click for details FAILED 5. Instance Method Unit Test:getInvalldPasswordCount 0/1 pts - Click for details FAILED Account.java* + New 1 public class Account 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 6. Instance Methods Unit Test: setPassword 0/1 pts - Click for details FAILED 7. Instance Methods Unit Test: getPassword 0/1 pts - Click for details FAILED 8. Instance Methods Unit Test: checkPassword 0/1 pts - Click for details FAILED 9. Output Test: toString() 0/1 pts - Click for details FAILED

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!