Quantcast
answersLogoWhite
notificationBell

Top Answer
User Avatar
Wiki User
Answered 2013-06-02 22:50:47

If a class is intended to be used purely as a base class then it must have one or more pure-virtual functions (a function that may or may not have an implementation). Such a class is regarded as being an abstract base class because no instances of the class can be instantiated other than through derivation, and the derivative must provide an implementation or it too becomes an abstract base class. The abstract base class need not declare a pure-virtual method if it inherits one or more pure-virtual methods from another base class but does not provide a complete implementation. Only classes that provide a complete implementation can actually be instantiated. Implementations may be inherited from lower base classes other than the one that declared the function pure-virtual in the first place. Once a derivative implements a pure-virtual function, that implementation may be inherited by subsequent derivatives.

If the base class may be instantiated in its own right then it must not declare any pure-virtual methods, nor must it inherit any pure-virtual methods that have no implementations. In this case the base class may be derived from, but doesn't have to be derived from, whereas an abstract base class must be derived from.

001
๐Ÿ™
0
๐Ÿคจ
0
๐Ÿ˜ฎ
0
๐Ÿ˜‚
0
User Avatar

Your Answer

Still Have Questions?

Related Questions

How class is different from structure?

Structures are public by default. Classes are private. Other than that, they are essentially the same in C++.


What other classes can mages turn into on dragonfable?

You can turn into any of the other class (bar the other base classes, and base class Dragon versions)


What is superclass and subclass in oop?

A superclass, base class, or parent classis a class from which other classes have been derived. The classes that are derived from a superclass are known as subclasses, or derived classes, or child classes.Sreekanth


Should schools offer advanced classes for every subject?

Yes, they should because there will always be students that are advanced and need upper level classes above other students in their class.


What is a super class in terms of object oriented programming?

A superclass, also referred to as a parent class, is a class what which other classes are derived from. These derived classes are known as either subclasses or child classes.


What is the difference between structure and class with example?

Structures are public by default whereas classes are private by default. Other than that they are exactly the same. struct s { int num; // s.num is accessible outside of the structure }; class c { int num; // c.num is only accessible to the class itself. };


When do you use inner classes?

You use inner classes when you know you'll never need to access that class from anywhere else. A common use of this is in a linked list implementation: public class LinkedList { private class LinkedListNode { } } There's no reason for any other class to have access to your node class, so it should be an inner class.


Final classes in java?

A class declared as final means that no other class can inherit from it.


How many classes to fail to be held back?

depends what class it is and if you have any other classes that you have failed..


What is the Difference between abstract class and class?

Abstract classes are classes that can't be instantiated directly. In other words, you are meant to create subclasses, which you instantiate.



What high school classes should you take to major in interior design?

You should probably try to go into AP art classes because in highschool they don't have the class Interior Designingspecifically.Actually, my high school has an interior design class...and ok, AP art classes I'll get into, but what other classes would provide me with more of the skills I need to become a successful interior designer?


What is derived class in brief?

A derived class is any class that inherits from one or more other classes, known as base classes. The derived class inherits the sum total of all public and protected members of all its base classes, including their base classes. The derived class is a more specialised form of its base classes. Any members of the base classes that are declared virtual can be overridden, such that calling the base class method directly actually invokes the derived class method, thus enabling polymorphic behaviour.


What is a derived class in c plus plus?

A derived class is any class that inherits from another class (known as a base class). Derived classes can inherit from several base classes (multiple inheritance). Base classes may themselves be derived from other classes. Each derivative expands upon the functionality of its base class, making it more specialised. Derived classes inherit all the public and protected members of their base classes, except the constructors. Friends of base classes are not inherited either. An example of class inheritance declaration: class myDerivedClass : public myBaseClass { public: myDerivedClass(); };


What are wrapped classes?

Wrapped classes are wrapped by Visible ones, which means wrapped ones should be invisible. Adapter Pattern is very closely related to wrapper, because it comes with 2 different flavors: object wrapper and class wrapper. There is also another way to define "wrapped" classes: a private class defined within another class. For example: class TheWrapper { private BeingWrapped _internal; } class TheVisibleOne { private class WrappedClass { } // this class is only accessible in TheVisibleOne } BeingWrapped and WrappedClass are the ones being wrapped/hide by other classes.


What is abstract base class?

A class that does not include an implementation and therefore cannot be directly used. It is used to derive other classes; the derived classes implement the methods.


Is the word classes an object?

Classes is the plural of the word class. A class is not an object in the physical sense, it is an idea, a notion or concept. We typically use a class to define a classification, such as a class of people, a class of study or a class of object. In other words it defines a type.



What is the difference between class and classes?

One is singular, the other is plural.


What is the schema master?

schema Master All databases have a schema which is a formal definition (set of rules) which govern the database structure and types of objects and attributes which can be contained in the database. The schema contains a list of all classes and attributes in the forest. The schema keeps track of: * Classes * Class attributes * Class relationships such as subclasses (Child classes that inherit attributes from the super class) and super classes (Parent classes). * Object relationships such as what objects are contained by other objects or what objects contain other objects. There is a class Schema object for each class in the Active Directory database. For each object attribute in the database, there is an attributeSchema object. Schem Master is A FSMO role held by single DC in forest


Is there class name as object in java?

Yes, the base class for all other Java classes is Object.


Can a final class be implemented?

Declaring a class as final basically means that other classes cannot extend it.


What is the meaning of 'back-to-back classes'?

It means you have one class straight after the other.


Where can I teach a class at other than a college?

There are online classes, and various clubs like garden clubs have classes.


What is the difference between classes and structure?

Classes are expanded concepts of structures, and can hold functions along with variables and other information.


Still have questions?

Trending Questions
How to Make Money Online? Asked By Wiki User
Best foods for weight loss? Asked By Wiki User
Unanswered Questions
How old is zak beggans? Asked By Wiki User
Does arsenio hall have ms? Asked By Wiki User