D
Devon Null
I have been exploring the concept of abstract classes and I was curious
- If I do not define a base class as abstract, will it be instantiated
(hope that is the right word) when a derived class is created?
if ( answer == false )
{
Would the idea of an abstract class simply be used to enforce integrity
of the classes by disallowing the abstract class to be instantiated, or
are there other purposes for it?
}
else if ( answer == true )
{
I'm guessing to prevent this would be the "why" and "when" of using
them, as well as enforce class integrity.
}
Is there a "proper" way of using/creating abstract classes?
Thanks
P.S. I apologize if this info is readily available on Google, but I did
a cursory search and came up with a lot of stuff that, while
interesting, did nothing to answer my very specific question. I know
that a vast quantity of the collected human intelligence on the subject
is here, so I thought I might go to the fount of knowledge directly.
Thanks again.
- If I do not define a base class as abstract, will it be instantiated
(hope that is the right word) when a derived class is created?
if ( answer == false )
{
Would the idea of an abstract class simply be used to enforce integrity
of the classes by disallowing the abstract class to be instantiated, or
are there other purposes for it?
}
else if ( answer == true )
{
I'm guessing to prevent this would be the "why" and "when" of using
them, as well as enforce class integrity.
}
Is there a "proper" way of using/creating abstract classes?
Thanks
P.S. I apologize if this info is readily available on Google, but I did
a cursory search and came up with a lot of stuff that, while
interesting, did nothing to answer my very specific question. I know
that a vast quantity of the collected human intelligence on the subject
is here, so I thought I might go to the fount of knowledge directly.
Thanks again.