Showing posts with label OOPs. Show all posts
Showing posts with label OOPs. Show all posts

Thursday, February 25, 2016

OOPs!

The basic elements of Object Oriented Programming are:

Classes
Classifies/categorizes an object(=thing) or a group of objects in a context based on certain specifications - attributes and behavior.

Objects
An object represents a particular instance of a class. There can be more than one instance of a class. An Object is a collection of data members(=attributes/data) and associated member functions (=behavior/methods).

Data Abstraction
Abstraction refers to the act of representing essential features without including the implementation details.

a Car, for an instance, would be made up of an Engine, Gearbox, Steering objects, and many more components. To drive a Car, one does not need to know, how the different components work together internally but to control the steering and applying the gears (interfacing it).

Data Encapsulation
Wrapping up of data and its functions into a single unit is called Encapsulation. Data is not accessed directly in this case but through the methods inside the class.

Inheritance
Inheritance is the process of creating a new class from an existing class. Inheritance helps in reducing the overall code size of the program and promotes code re-usability.

Classified as 1) single and 2) Multiple (implementation) inheritances.

Polymorphism
In Greek, “Poly” means many, and “morph” means form. One name with many forms is called Polymorphism. It allows objects of different types to be treated similarly. This can be implemented in C++ via the inheritance hierarchy, also known as sub type polymorphism.

Thursday, June 3, 2010

What's in the Title?

akx Solutions is a website, through which technical solutions are being shared, already. This blog is an extension to that and hence is the title akx++ Solutions, which has also been described in terms of inheritance symbolically.

class akx++Solutions : public akxSolutions{ };

Hence, it is-a a site that inherits the core idea of sharing technical solutions and adds new look & interface on its own. Also, both are loosely coupled and hence can be updated independently without changing the basic interface(/ core idea). However, having an access to blog can reach out to site (using the link provided on sidebar) or vice-versa.

Above interpretation, however, might still be hypothetical. Thus, suggesting, not to get carried away strictly by the OOPs and derive comparisons.