Hey, I'm working through Objects First with Java and using bluej. I've just gotten to where I call other classes and methods, and sometimes I can get it to work. Other times, like the example below, I'm completely suck. I've tried every combination I can think of to get the bidder's name called, but nothing works. Is it because of the 'this'? I think this is all the relevant code, but if I should post more just let me know.
Any help would be appreciated, thanks!
public String closeAuction()
{
String details = number + ": " + description;
if(highestBid != null) {
details += " Bid: " +
highestBid.getValue() + " by " + //here's where I'm stuck, I want to get the bidder's name
}
else {
details += " (No bid)";
}
return details;
}
public Bid(Person bidder, long value)
{
this.bidder = bidder;
this.value = value;
}