this is the way i would look at it
Use abstract if you plane on make a class more specialized
example you want to make a class GermanShepard,
since GermanShepard is a more specilaized verison of a dog, and there are no such things as just dogs, there are only diffrent type of dogs the dog would make an exelent canidate ore abstraction
class dog{
...
}
class GermanShepard expands dog{
...
}
and use interface when you think many unrelated obj may posses a similar method or characteristic.
like say eyes, ears, nose, walk() talk().
then you might make and Anaimal interface
I know what your thinking, why not make Anaimal a abstarct class as well. You could, but providing and interface allow for you to right other classes that call on the interface methods of classes that you have yet to even dream of making.
It also give you the ability to implement many characteristics with multible interfaces, there is no mulitple inhertance so this is a big advatage.
so this is my little example
interface Anaimal{
String talk();
}
abstract class Dog implement Anaimal{
abstract String wagTail();
}
class GermanShepard expands Dog{
String talk(){
return "Woof Woof";
}
String wagTail(){
return "Up Down, Up Down";
}
}
//Notice i am implementing to interfaces
class Human implements Anaimal, Primate
{
String talk(){
return "Hello";
}
}
Notice that both the Human and the GermanShepard use the talk() method, yet only the dog wags a tail.
This wount compile but i hope you get the point, if not e-mail me and i will make a working example for you.
example
[ June 07, 2002: Message edited by: Trent DiBacco ]