Philip Stone

+ Follow
since Aug 18, 2011
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Philip Stone

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

9 years ago
I believe i initalise the list array in my AddressBook class :

How do i go about making it null?
9 years ago
I have the majority of the program working now with all the classes.

Currently working on the addEntry() method within the AddressTextUi.
All the classes compile and i am able to show the menu, when you enter the right option it goes to add entry
it then asks for each of the data variables to be entered forename, surename, street address so on. However once it gets to the end on the last input i get an error message

"java.lang.String.NullPointerException: null"

and it points to this

AddressTextUi Class:

Address Class:

9 years ago
I'm just trying to get the AddressBook class working, i only really need the menu in the text ui i think.

The search by last name and print all contacts work fine but looking at the add entry which was taken from the old it doesn't link at all with the other classes, I really need help sorting this am getting a bit flustered as i only have a couple days left to finish, Please help

9 years ago
Okay i'll look to changing, thanks

I just need help now with my addressbook class and the text ui, I still have the text ui i was using at the start when it linked to one other class.

This is what i believe should be in my addressbook class, the texui is underneath

addressbook class:


9 years ago
This is what i have at the moment:

Postcode class:

Name class:

Address class:

Contact class:

9 years ago
Thanks i'll have a read, are these methods essential for this to work then because this is the first i've seen any of this. Also nothing happens when you call the void main(String[]args) method from the postcodedemo
9 years ago
i'll really sorry i feel like an idiot but i don't understand what you mean :/
9 years ago
I just need some clarification when i'm going about this right

This is what i have so far for my contact class

And this is what i have so far for my addressbook class

9 years ago
Okay i'll leave postcode and address class alone, just get the address class working like before and work on the contact class now.

For the contact class i just have the members:

then just need to have a createContact method i guess
9 years ago
yeah i thought that and didn't have a parameter for the get method before i must of read something wrong and put it in for some reason. I've cleared it up now so it's less confusing with the postcode class and the type.

Still having this issue in my address class though when typing in a postcode
9 years ago
so in the postcode class:

and address class:

are you suggesting to remove the set method from the address class?
9 years ago
So this is the current code in the address class, it compiles now but when you try and set the postcode i get an error - found java.lang.string but expected Postcode, the get postcode method seems to work fine but as i can't seem it set it i only return a null each time which is expected

Code in postcode class:

9 years ago
thats what i have at the moment, wrong but i can't see why i thought it would follow like the set postcode method

9 years ago
Yeah i mentioned it previously, i've fixed that now so it works properly.

I also need the method get postcode i assume in the address class, i keep getting an error saying it finds postcode but expected java.lang.string which it is.

After this i think i can pretty much sort out addressbook and contact class

9 years ago