The word abstract means a concept or an idea not associated with any specific instance.
AbstractionThe word abstract means a concept or an idea not associated with any specific instance.In programming we apply the same meaning of abstraction by making classes not associated with any specific instance.The abstraction is done when we need to only inherit from a certain class, but not need to instantiate objects of that class. In such case the baseclass can be regarded as "Incomplete". Such classes are known as an "Abstract Base Class".Abstract Base ClassThere are some important points about Abstract Base Class :
Finally we created an Object 'mydog' of class dog, but we didn't instantiate any object of Abstract Base Class 'animal'.According to "Ivor Horton" (a programmer of Java) an object can not be instantiated, but we can declare a variable of the Abstract Class type. If this statement is true then it could be possible:animal thePet;This is an object which is declared as thePet and its data type is the abstract base class 'animal'.We can use this Object to store Objects of the subclass.In the above code we declare an Object 'thePet', of the type animal (the Abstract Base Class) and simply copied the object of another object (only the reference is copied as they belong to reference type). Now we can use object 'thePet' just as object 'mydog'. The output of this code would be as dog can eatdog can sound Conclusion:l conclude here by saying that Abstraction is not a difficult job to do, but you need to be confident while performing abstraction. Our every new topic covers the all previous topics. In the abstraction the polymorphism is being covered and performed. The method overriding could be done by putting the keyword 'new' before that overridden method. Everything is possible in Programming and there are multiple ways to do a single job. Abstraction is one of the smart ways to do these kind of tasks.
Pro WPF: Windows Presentation Foundation in .NET 3.0