I don't think that strategy pattern mandates the use of interface and
not abstract classes.

However, as we know, abstract classes can have implementation code
within it, but interfaces can only define method signatures, so a good
thing about using abstract classes is that we can use another pattern
namely Template Method to define the skeleton of the algorithm in the
abstract class.

Just my 2 cents.

Zhang Yining :-)
Software Engineer
eXtropia.com

-----Original Message-----
From: dotnet discussion [mailto:[EMAIL PROTECTED]] On Behalf Of
Steven Fraser
Sent: Friday, April 19, 2002 1:06 AM
To: [EMAIL PROTECTED]
Subject: [DOTNET] Abstract classes


What is the difference between using an abstract class and using an
interface class? If I'm designing a strategy pattern why does the
strategy class have to be abstract and not an interface class.

You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to