[thelist] more OOD fun

Peter Brunone (EasyListBox.com) peter at easylistbox.com
Mon Oct 11 14:04:52 CDT 2004


Hi Scott (and others):

	I don't have anything particular to add to this discussion, but
if you're not on some more specialized ASP.NET lists, I'd suggest
perusing the offerings on one or more of the following sites:

http://aspfriends.com
http://asp.net/forums
http://aspadvice.com

	Not that I'm trying to discourage anyone from asking questions,
but you're more likely to get an expert answer (or more than one) on
forums dedicated to the technology.

Cheers,

Peter

-----Original Message-----
From: thelist-bounces at lists.evolt.org On Behalf Of Scott Dexter

I'm building up a small site for a buddy, and using the opportunity to
get into asp.net (C#). Anyhoo.

I've confused myself a little and I'm curious what a best path would be
to take:

I have a Person class, and two (possibly three) subclasses. I have an
IPerson interface defined, and the Person class implementing it. I have
a different class using IPerson objects, but there are a couple
instances where I want to access properties in one of the Person
subclasses, outside the interface. My question is mutli-fold:

Where is the (better?) place to implement the interface? On the
subclasses?

Do I include everything I access into the interface, despite the fact
there may be items in there not used depending on the subclass?

The specifics: Person is subclassed into Guest and Guide classes. The
Guest class extends Person by adding payment information and comments,
items not in the Guide class. Now in the application, if I don't have
teh payment information in the IPerson interface, I can't get to it,
unless I declare the object as a Guest, which avoids the interface,
which is not the best thing to do ... right?

Thanks, I'm sorry if I'm not being clear...

sgd
(Those who have been around a while may be surprised to find out this is
the first time I've really done any OOD to this extent. Go figure)
-- 

* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 




More information about the thelist mailing list