Encyclopedia > Concrete class

  Article Content

Concrete class

In computer science's object-oriented programming, a concrete class is a class for which entities (instances) may be created. These contrast with abstract classes which can not be instantiated because they have not been completely defined yet

Example in C++

class Abstract {

public:

      virtual void MyVirtualMethod() = 0;

};

class Concrete : public Abstract {

public:

      void MyVirtualMethod()
      {
       //do something
      }
};

An object of class Abstract can not be created because the function MyVirtualMethod has not been defined ( the =0 is C++ syntax for the a pure virtual function, a function that must be part of any (derived) class but is not defined in the base class. The Concrete class is a concrete class because it's functions (in this case, only one function) have been declared and implemented.

See also



All Wikipedia text is available under the terms of the GNU Free Documentation License

 
  Search Encyclopedia

Search over one million articles, find something about almost anything!
 
 
  
  Featured Article
Jamesport, New York

... from 18 to 24, 26.8% from 25 to 44, 27.7% from 45 to 64, and 19.9% who are 65 years of age or older. The median age is 43 years. For every 100 females there are 102.7 ...

 
 
 
This page was created in 36.2 ms