Dating from lower class protocol

Rated 4.26/5 based on 899 customer reviews

On the other hand, an Abstract Class is like a partially built class. It might be using English, but that isn't as important as the fact that some of the document is already written.

An abstract class is the foundation for another object.

An interface would be like the English Language: defining an interface defines how your code communicates with any object implementing that interface. When a class says "I implement interface Y", it is saying "I promise to have the same public methods that any object with interface Y has".These concepts, while easy to confuse, are specifically different and distinct.For all intents and purposes, if you're the only user of any of your classes, you don't need to implement interfaces. Classes defined as abstract may not be instantiated, and any class that contains at least one abstract method must also be abstract.Methods defined as abstract simply declare the method's signature - they cannot define the implementation.

Leave a Reply