What is the basic class?
The basic class, also called SuperClass, is a computer object that acts as a basis for one or more derived classes. Any computer language capable of inheritance can create a base class. Depending on their exact type, basic classes may be or may not be able to initialize - assign the initial value of the object - but always give some common features of any class that inherits. The number of derived classes or subclars that may have basic classes may have a limit, but there may be a limit depending on the computer language, the number of basic classes that the class of derived can have a limit. It is said that languages that allow a derived class have only one base to enforce one inheritance, while those that allow derived class to use multiple heritage. This means that the base class object can be made. If an example of a class base for a derived example of class2, an object of the potential typeDu2 and an example object can be done. An example object can only be done expressly by calling for this type of object; Creating an object type 2 does not mean a secondary object of type example. In any case, the type of object created only creates an instance itself.
abstract base classes of basic basic classes, on the contrary, cannot be initialized separately, which means that the subject of the base class cannot be carried out by itself. If class 3 is an abstract base for a derived example of Class4, only an example of example4 can be made. Although Example4 includes data from the type Example3, an attempt to create an object exclusively from the type of example3 will result in an error. This feature may occasionally be useful, especially if the example of Class 3 contains private data that should be firmly regulated.
Depending on the language in which it appears can have a basic class slightly different behavior and significantlydifferent names. In Java®, basic classes are always referred to as this name, while in C ++, depending on their structure, virtual classes can be called. The differences in the name and functionality, although they are significant in terms of computer languages, do not mean the main differences in the principle of classes. The basic class is always used to encapsulate normal functionality and data for its derived classes, regardless of language.