Answered by:
Multiple Inheritance Question

Question
-
User-296654088 posted
Hi,
I have created objects for the following:
- Person
- PhysicalAddress
- CorporatePosition
A person will have a physical address and a corporate position so I wanted to inherit both to no avail. How do I handle this?
Saturday, February 13, 2010 7:36 PM
Answers
-
User-1557892389 posted
Hrmm, given the context here, is this even a situation where you would want inheritance? Seems, to me, like your Person object would have a Physical Address Property and a Corporate Position property. Inheritance would be more for a situation like BigBoss and Janitor inherit from Person.
Also, since you are doing an address class, might I suggest automatically geocoding through google. I have a blog post that gives you a set of code to do it:
http://jasonjano.wordpress.com/2010/02/10/address-geocoding/
Good Luck.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, February 13, 2010 8:30 PM
All replies
-
User-1557892389 posted
Hrmm, given the context here, is this even a situation where you would want inheritance? Seems, to me, like your Person object would have a Physical Address Property and a Corporate Position property. Inheritance would be more for a situation like BigBoss and Janitor inherit from Person.
Also, since you are doing an address class, might I suggest automatically geocoding through google. I have a blog post that gives you a set of code to do it:
http://jasonjano.wordpress.com/2010/02/10/address-geocoding/
Good Luck.
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Saturday, February 13, 2010 8:30 PM -
User-296654088 posted
Jason,
Thanks for your response. The geo-coding idea sounded really appealing but looks like I won't be able to get it for free as my app is an Intranet/Extranet application. What a cool feature that would've been though.
Sunday, February 14, 2010 12:09 AM -
User-1557892389 posted
Heya,
The great thing about the google geocoding is that it is free. You just need to sign up for a maps api key and throw it in your web.config.
Monday, February 15, 2010 9:54 AM