what is abstract and virtual classes?
abstract classes are those classes that provide no implementation details. They are just defined but not implemented. you cannot create objects for these classes. for virtual classes follow this lnk: http://publib.boulder.ibm.com/infocenter/comphelp/v8v101/index.jsp?topic=%2Fcom.ibm.xlcpp8a.doc%2Flanguage%2Fref%2Fcplr135.htm
If a subclass *needs* to override a member (i.e. you can't specify a meaningful body in the base class, as it can't be defined), then it should be abstract in the base-class; if you just want to give the subclass the *ability* to override a method (if they want) then it should be virtual. Any abstract member forces the entire class to be abstract, which also means you can't create actuall instances of the base class, but you can of the superclass.
Join our real-time social learning platform and learn together with your friends!