Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / General / September 2005

Tip: Looking for answers? Try searching our database.

Objects, Abstract Classes or Interfaces

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Wayne Phipps - 20 Sep 2005 19:56 GMT
I'm trying to get my head around objects and am asking for thoughts on this
idea.

If for example I were to implement a Person Object, there may be differnt
Person objects representing people of different cultures.

All Person objects have similar characteristics, ie Height, Weight, Age ect
but I imagine that there could be a method ie SayHello which Person objects
of different cultures would implement differently.

Now what i'm trying to figure out is whether the Person Class should be
abstract to cope with different cultures or whether I should create an
interface or both.

Thoughts and comments appreciated.

Regards

Wayne Phipps
CT - 21 Sep 2005 09:14 GMT
Hmm, I'd go for an inheritable/non-sealed class but not an abstract one. As
you point out, there are similar characteristics, so why not implement the
basic functionality and for some this will be all that's neded. Just make
sure it can be overridden and overloaded in derived classes. Just my
$0.02...

Signature

Carsten Thomsen
Enterprise Development with VS .NET, UML, AND MSF
http://www.apress.com/book/bookDisplay.html?bID=105
Communities - http://community.integratedsolutions.dk

> I'm trying to get my head around objects and am asking for thoughts on
> this
[quoted text clipped - 18 lines]
>
> Wayne Phipps
Nick Malik [Microsoft] - 21 Sep 2005 13:32 GMT
It's time to learn patterns.

See the following link:
http://blogs.msdn.com/nickmalik/archive/2004/12/21/328727.aspx

Signature

--- Nick Malik [Microsoft]
   MCSD, CFPS, Certified Scrummaster
   http://blogs.msdn.com/nickmalik

Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
  I do not answer questions on behalf of my employer.  I'm just a
programmer helping programmers.
--

> I'm trying to get my head around objects and am asking for thoughts on
> this
[quoted text clipped - 18 lines]
>
> Wayne Phipps

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.