For the equals method in the class MutableCircle (Jan 28)Isif ((this.radius==c.radius)&&((this.p).equals(c.p))){return true;}the same asif ((this.radius==c.radius)&&((c.p).equals(this.p))){return true;}?
In short, Yes.Long version:Because c.p uses the same method (.equals() of the class Point) as this.p, it's essentially like saying if Hannah = Miley, then Miley = Hannah...No, I have no idea why Hannah Montana came to mind first instead of Bruce Wayne/Batman.
You could have switched names before posting, mate. bWayne and batman is definitely a lot cooler =)
This comment has been removed by the author.
When will we get our critiqued lab exercises back? Thanks.
For the equals method in the class MutableCircle (Jan 28)
ReplyDeleteIs
if ((this.radius==c.radius)
&&((this.p).equals(c.p)))
{
return true;
}
the same as
if ((this.radius==c.radius)
&&((c.p).equals(this.p)))
{
return true;
}
?
In short, Yes.
ReplyDeleteLong version:
Because c.p uses the same method (.equals() of the class Point) as this.p, it's essentially like saying if Hannah = Miley, then Miley = Hannah...
No, I have no idea why Hannah Montana came to mind first instead of Bruce Wayne/Batman.
You could have switched names before posting, mate. bWayne and batman is definitely a lot cooler =)
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteWhen will we get our critiqued lab exercises back?
ReplyDeleteThanks.