Hi i'm having trouble calling my method in a class. I can't seem to use my tester user input and apply it to the class.
here is the code from the class:
and using the method nextNumber() how do I get the user's input to be applied in the method because it doesn't have parameters! I know theres a way I just can't figure it out! Thanks in advance!
here is the code from the class:
Code:
public int nextNumber()
{
if(count < 2)
{
count++;
return 1;
}
else
{
fnew = fold1 + fold2;
fold2 = fold1;
fold1 = fnew;
return fnew;
}
}
and using the method nextNumber() how do I get the user's input to be applied in the method because it doesn't have parameters! I know theres a way I just can't figure it out! Thanks in advance!