Thank you. Thank you to you and everyone else who gave advice.
Type: Posts; User: blobby404
Thank you. Thank you to you and everyone else who gave advice.
Iv found the error. I had repeated some strings in the switch statement multiple times. So actually output was correct, i had just repeated some strings by accident.
OLD VERSION OF CODE:
...
No, because the output that the switch statment has been producing has been incorrect, whereas the IF statements was producing the correct results, which is why i cant figure out why it is not working
1 Shaun Password1! memorable1
2 Andrew Password2 memorable2
3 Danny Password memorable3
4 Zac password memorable4
5 Lauren pass memorable5
6 Jake memorable6
7 Andy p7 memorable7
8 Chris...
I can actually check the output perfectly fine, i have a Binary Tree which allows me to search users and test this. I know which passwords equal what strengths! Although i am only showing this method...
Well according to the lessons that i have taken it is better to code with less lines. Iv already done this and they are not, i think it is a syntax error but i am unsure as i am unfamiliar with Java....
Because it uses less lines of code. And yes it can be zero, if no password exists then it is indeed zero. When a password which is an empty string is checked then the program still returns "no...
I have created an algorithm which checks a password for its strength. The program does this by checking for length of string, and types of charecters used.
I have created this method using mainly...
Iv attempted this, and whilst it works to some degree; It is detecting Very strong passwords as strong, and strong passwords as meduim, etc. Help me please! Haha xD
Below is my case statement...
Would it be possible to show me the full code of how to do this? I'm not too sure of how to code this properly - even with the example you have given. I would be very grateful!
Ahhhh, being fairly new to programming i assumed that i could make this code more efficient. So is there no way this code can be made more efficient?
Kind Regards, Shaun
So from what iv learnt in Java and programming in general is that using a case statement is far more efficient that using multiple IF statements. I have an multiple IF statements contained within a...
Iv created an array list which contains people and attributes such as user id, username etc. It works fine for the most part. It allows the user to enter a name into the system. If the name entered...
Thank you, iv adapted my code accordingly but receive a new error.
if (strengthCount==1) {
strengthCount=Weak;
}
if (strengthCount=1) {
strengthCount=Weak;
}
This is where the error begins.
Error: incompatible types: int cannot be converted to boolean.
Done.
I am getting an error: incompatible types: int cannot be converted to boolean.
I understand data types and understand the conflict within the code but do not understand how i can resolve...
Heres my code so far. It says cannot convert int to boolean though? I understand data types and why there is conflict within my code but do not understand how to resolve this, can you help?
I am...
Well, simple as in;
I start with a count that is = 1 (Very low strength password)
Other password strength levels are:
2= low strength password
3= medium strength password
4= high strength...
Hi there! I am developing a number of Data Structures in Bluej. Iv created a nice little arraylist program, and want to add a password generator to this program. People are already prestored within...
Please read all of this before commenting! Thank you!
Im fairly new to Java, i use the BlueJ software to develop my programs.
I am creating a program which holds two data structures; Array...