Okay, so inside the method insert I need to have those references?
--- Update ---
Okay I've figured it out
class PhoneBookList implements PhoneBook {
Type: Posts; User: arhzz
Okay, so inside the method insert I need to have those references?
--- Update ---
Okay I've figured it out
class PhoneBookList implements PhoneBook {
And that small fix is changing the person Class?
Is there a way to implement that method without chaning the Person class?
Hmmmm okay I'll give that a shot
--- Update ---
Okay so I've come up with something
class PhoneBookList implements PhoneBook {
So how would I use this method to tell it compare the person in the list with the one the user inputs?
The variable name is defined in an class Person. Sure i'll use something a bit more descriptive.
PhoneBookList.java:19: error: cannot find symbol
int comparison = p.name.compareTo(person.name);
^
symbol: variable name
...
Well in the method insert no; That is if I've done everything and that includes; checking if a person with that name exists, if yes inserting that person if not returning false. And What do you mean...
Hmmm okay gimme a few minutes to try to implement that.
--- Update ---
Aight I've implemented your suggestion like this;
class PhoneBookList implements PhoneBook {
Yes if the entry that we are trying to insert alredy exists the code should return false.Insert is susposed to create a new Person object(insert it in the list). The person contains a name,adress and...
Aight I'll do that
--- Update ---
Okay after some trying I've decided to take the program step by step, in order to make it easier.The logical way implies to start with the method insert and...
"I think the description of that code should be: compare the name of the person in the Node object with the string entered by the user."
Yes that is exactly what i want the compare to method to...
Okay, so after trying for 2 days straight I'm quite lost in this program.I cannot get it to work and I need some assistance. I put comments on parts of the code that I'm not sure how to implement and...
Aight I'll try that, thanks!
Hey, so I need to write a program that simulates a phonebook. The program should contain the options to lookup a person,delete a person,insert a person, and too check the size(amount of persons...