Here is the specific homework question: "Compare and contrast abstract classes and interfaces. Why would you use an abstract class? Why would you use an interface?" My problem with this, is that I completely don't understand the concepts enough to compare or contrast them. I am looking for a concise answer but detail enough to understand this better.
Currently, all I know about abstract classes is that you make an abstract class to provide an appropriate superclass from which other classes can inherit and thus share a common design.
And all I know about interfaces is that they are useful for assigning common functionality to possibly unrelated classes so that objects of those unrelated classes can be processed polymorphically.
But I don't at all understand how these two things relate in a practical useful sense.
Thank you.
2007-03-26
06:12:54
·
2 answers
·
asked by
prodaugh-internet
3
in
Computers & Internet
➔ Programming & Design