Completed Passwords class with test cases