I see.. didn't see your post in the end. Going to try what you said here.
Thanks.
Type: Posts; User: MrLowBot
I see.. didn't see your post in the end. Going to try what you said here.
Thanks.
private boolean isEqualTo(Point p22) {
if (p1.x == p2.x && p1.y == p2.y) {
return true;
} else
return false;
}
It works, thannkss! :D
And thanks for not giving me the answer...
The numbers for the x and y for both given points.
Ehm.. we have to see if two things are equal to each other?
Via some sort of method that tests whether it is true or not?
Alright! So we have two sets of points. Points for "p1" and points for "p2".
This part of the code :
if (p1.isEqualTo(p2)) // False!
System.out.println("The two points are equal");
Which...
It went away once i moved the points to their own publics.
Atm i am trying to figure out how i should go about to see if p1 == p2.
Since it only saves the value stored at x and y only.
What...
Wow.. i had no idea that the assignments didn't catch on because of the way that they were written.
I mean i know that "++example" and "example++" both have different meanings but i didn't that it...
I see. In either case. I can now print from the toString method that i have made. However i cannot update the values that i have, and i think that they might overlap aswell.
The reason for why i use...
km222nb_lab3.Point@15db9742
km222nb_lab3.Point@6d06d69c
I am almost 100% sure of that i am in the wrong here.
That's very true however now i feel more stuck now haha.
Seeing how they want this and also seeing that there wouldn't be any need for a method for that..
Because i only get errors trying to print...
Hey.
I have this assignment but i have no idea of how to fix a part of it and i have been stuck on it for a while.
Any ideas? I get stuck at p1 and p2. I can print them but they want me to get...