Why does rightprice have a loop? The name should be a verb, that describes what it does.
For example: checkIfRightPrice
Perhaps it should return true or false to tell its caller if the price was...
Type: Posts; User: Norm
Why does rightprice have a loop? The name should be a verb, that describes what it does.
For example: checkIfRightPrice
Perhaps it should return true or false to tell its caller if the price was...
Who wrote that code? Can you ask them what the code is for?
Normally method names are verbs that say what action the method is going to take. I do not know what action rightprice is supposed to...
Sorry, I do not write code for students to copy.
One big problem with the code is the infinite looping possible in the while loop:
while ((Price<RightPrice)||(Price>RightPrice)){
If the value(s) of either of those variables are not changed,...
How can I compile and execute the code for testing to see what happens?
I do not recognize the Program class. I would need it to compile and test the code.
What do you want instead?
Please explain why you say that.
Please explain what "does not work" means.
Are there compiler errors? Please copy the full text of the messages and paste them here.
Is the program's output wrong? Please copy the contents of the...
Can you explain what problems you are having with the program in some more detail?