What is Abstract Class? And what are the difference between Abstract Class and Abstract Method?

An abstract class is meant to be used exclusively as a base class. In other words, it cannot be instantiated directly, but classes that derive from it (if not also abstract classes) can be instantiated. An abstract method is the same thing at the method level: there's no method body, and it's intended to be implemented in a derived class.

In C++ an abstract method is created with the pure virtual syntax, and an abstract class is defined as any class that has one or more pure virtual member functions:

class Abstract
{
    void foo() = 0; // An abstract method makes the class abstract
};

The above might also be called an interface because it only defines abstract methods.

p.s. I'm answering this in good faith, despite your previous posts following a pattern of signature spammers. That is, posting topical but largely fluff questions and answers, then applying a spammy signature to one's account after accumulating a number of such posts. Note that I'll be keeping an eye on you. ;)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.