Thanks mate, thats helped me solved it without the use of an extra method. I'm now understanding the concept of returning objects a lot better. Cheers for your help :)
Type: Posts; User: Stockholm Syndrome
Thanks mate, thats helped me solved it without the use of an extra method. I'm now understanding the concept of returning objects a lot better. Cheers for your help :)
I understand what you mean now. But this is my first time using instance methods which return objects and i'm a bit puzzled. For example, is there a way of individually printing the variables from...
Apologies yes, you're right I forgot to update my code the code should be:
Point pt = new Point();
pt.x = (x+mid.x)/2;
pt.y = ((y+mid.y)/2);
return pt;
I'm still not sure how to...
Hello everyone,
I'm stuck on a programming exercise and was wondering if anybody could help. I'll start off with the question:
Add to class Point in Question 1 an instance method midPoint which...