Re: Selecting class at runtime

From: Ravichandran J.V. (jvravichandran_at_yahoo.com)
Date: 04/25/04


Date: Sun, 25 Apr 2004 02:51:23 -0700

An abstract class serves as a blueprint for some implementation and
hence, whatever methods that may be used in future, through inheritance,
should be declared as prototypes in the abstract class.

Declare your DoStuff method as virtual so that they could be overridden
in the deriving classes and then, calls to the derived class methods
through an object of type Base Class will work.

with regards,

J.V.Ravichandran
- http://www.geocities.com/
  jvravichandran
- http://www.411asp.net/func/search?
  qry=Ravichandran+J.V.&cob=aspnetpro
- http://www.southasianoutlook.com
- http://www.MSDNAA.Net
- http://www.csharphelp.com
- http://www.poetry.com/Publications/
  display.asp?ID=P3966388&BN=999&PN=2
- Or, just search on "J.V.Ravichandran"
  at http://www.Google.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Relevant Pages

  • Re: Multiple bounds in a generic declaration
    ... Both Foo is an abstract class and Bar is in this case a listener ... How can I declare this ArrayList? ...
    (comp.lang.java.help)
  • Re: Template method pattern in Java ???
    ... What is says to me is that nobody but the base ... >Then why do you want to declare it in an interface? ... Not an interface, an abstract class. ...
    (comp.lang.java.help)
  • Re: Template method pattern in Java ???
    ... What is says to me is that nobody but the base ... >Then why do you want to declare it in an interface? ... Not an interface, an abstract class. ...
    (comp.object)
  • Re: Template method pattern in Java ???
    ... What is says to me is that nobody but the base ... >Then why do you want to declare it in an interface? ... Not an interface, an abstract class. ...
    (comp.lang.java.programmer)
  • Re: Concrete class
    ... >> abstract class with ALL pure virtual functions. ... >> above philosophy then it means that your Shape is an interface. ... > of doing this is to keep the inheritance hierarchy at a low depths" is ...
    (comp.lang.cpp)