• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Address Book Java Issues

 
Philip Stone
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I've sorted my AddressBook Class out for the time being .. i think

Working on the View Entries in my text ui

This is my AddressBook Class now:




And inside my TextBookUi Class



When i compile however it says that it cannot find the variable name and i presume address as well.
I believe its looking in the correct place my contact class


 
Campbell Ritchie
Sheriff
Pie
Posts: 50175
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since Contact extends java.lang.Object, you may find super.toString() gives you something you don't actually want. I have already told you there is a much neater way to deal with null values in your equals() method.
Beware of returning null anywhere. Actually you might get null even if you don't have that test in the method, because values where n ≥ top ought to be null anyway.
 
Campbell Ritchie
Sheriff
Pie
Posts: 50175
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But that Contact class actually looks like object-oriented programming
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic