- Published: November 17, 2021
- Updated: November 17, 2021
- University / College: University of Texas at Austin
- Level: Secondary School
- Language: English
- Downloads: 31
Objects and Object Oriented Programming Introduction as used in object oriented programming is a group of things or objects that have the same characteristics. A class contains many objects that share all things in common. Objects in a certain class are the instances of that class.
Abstract class
This is a class that states explicitly virtual methods and it is labeled as abstract and thus no objects can be created in it. Opposite of this is a concrete class which allows for instantiation (Phillips, 2010).
Local class
This is a class that is defined inside another class. Class in which it is found is called the enclosing class. The local class is never instantiated together with its enclosing class and neither is it associated with instances in the enclosing class (Phillips, 2010).
Meta classes
These are classes whose instances are other classes. They collect classes and can create design patterns or describe frameworks.
Partial classes
These are classes that can be divided into parts in a single source code and these divisions merged during compile time so that they the output is one.
Unnamed classes
They are not bound to any name.
A subclass
Also known as derived, child or heir class inherits its traits from another or other class (es) known as the parent, base classes or superclasses. The subclass inherits member functions and instance variables from its superclass. While naming a sub class you use a colon the derived class name and its base name. You also show the visibility mode of the parent class as either private or public (Phillips, 2010).
Methods
These are procedures or behavior associated with objects in a class. They also act as a link of the objects to the rest of the world. Methods have a unique feature known as overwriting that allows objects to activate their behavior or action to a receiving object. They also allow for modification of the data of an object (Phillips, 2010).
Conclusion
In object oriented programming, behaviors of the objects instantiated in the parent class are the methods. Sub classes relate with the parent class by inheriting objects and their behaviors which are the unique traits of the objects.
References
Phillips, D. (2010). Python 3 object oriented programming: Harness the power of Python 3 objects. Birmingham, U. K: Packt Pub.