Keith Godwin

Greenhorn
+ Follow
since Oct 27, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Keith Godwin

Originally posted by Nachiket Patel:
Whoa,
How much code is done??? Is this application already working??



No, I'm using net beans to make the class diagram, it put in the getters and setters.

I specifically wanted to know, in isolation, if I had an Address class could/should I create two specialized sub-classes if the difference between them was just two attributes.

From previous quote:

ContactAddress IS An Address
OrganisationAddress IS An Address

They are both specializations of Address with differing Telephone attributes.

i.e. An Organisation has one main telephone line whereas a contact will have day time and evening telephone lines.



I'm inclined to do away with the generalizations thus:

Contact Has An Address
Organisation Has An Address

Then define telephone attribute in the Address class to have attribute array of phone numbers.

what do you think?
[ November 26, 2008: Message edited by: Keith Godwin ]
ContactAddress IS An Address
OrganisationAddress IS An Address

They are both specializations of Address with differing Telephone attributes.

i.e. An Organisation has one main telephone line whereas a contact with have day time and evening telephone lines.

hope that's clearer.
[ November 25, 2008: Message edited by: Keith Godwin ]
Hello all,

I'm new here and in fact very new to OO Design.

My first attempt is to design a contact management app. I'm reading a few books but there does seem to be a dark art arround what is 'right'.

So would you say this looks ok:



Specifically the use of inheritance with respect to the two tyes of address: contact and organisation which vary by their telephone number attributes. Should I use inheritance or some sort of a Map.

Any pointers (no pun) would be greatly appreciated.

cheers

Keith

ps I hope the image is ok.
[ November 25, 2008: Message edited by: Keith Godwin ]