Skip to main content

Object oriented programming language (OOPL) and Run time Polymorphism

Object oriented programming language (OOPL)

What is object in c++



Objects are the foundation of object-oriented programming, and are fundamental data types in object-oriented programming languages. These languages provide extensive syntactic and semantic support for object handling, including a hierarchical type system, special notation for declaring and calling methods, and facilities for hiding selected fields from client programmers. However, objects and object-oriented programming can be implemented in any language.

C++ Carry's the concept of object oriented programming
1) data abstraction
2) data encapsulation
3) modularity
4) inheritance
5) polymorphism

C++ is an OOPL not just because it supports the OOPS concepts but more importantly, those concepts are EASY to implement in C++, and sometimes some non OOPS concepts are difficult to do.

For example, it is possible to implement data hiding etc using C, but they are unusually difficult, whereas C++ directly supports the concept of access modifiers etc.

OOP language is one that allows or encourages, to some degree, object-oriented programming techniques such as encapsulation, inheritance, modularity, and polymorphism.

C++ is entirely differ from C
C++ is an OOP Language designed mainly for OO programming, but with some procedural elements.So clearly it is an Object oriented programming language.

Object-oriented (OO) applications can be written in either conventional languages or OOPLs, but they are much easier to write in languages especially designed for Object-oriented programming. Object-orientedlanguage experts divide OOPLs into two categories, hybrid languages and pure Object-orientedlanguages. Hybrid languages are based on some non-Object-oriented model that has been enhanced with Object-oriented concepts. C++ (a super set of C), Ada 95, and CLOS (an object-enhanced version of LISP) are hybrid languages. Pure Object-oriented languages are based entirely on Object-oriented principles; Smalltalk, Eiffel, Java, and Simula are pure Object-oriented languages.

everything that can be done using C++ can be done using C - that includes data-hiding as well. Its just that there are no explicit key words to support. That's the reason why C++ is preferred - because of these explicit keywords. Also, like I said before, "object-oriented language" is a loose term. It is either hybrid or pure OO. C++ is hybrid because it supports multiple styles of programming. Java on the other hand will not allow you to write a program that does not have a class. Hence Java is a pure object oriented language (though some people question that because Java supports primitive keywords like int whereas in Eiffel even Integer is implemented as a class).

c++ is not a pure object oriented programming language.
It is a object based programing language.
In c++ language we can write programs without using the class concepts.
But it is not possible in java,c#.net. They are purely object oriented programing language. If we want to write a programme for simple addition also we must using the class concept. But in c++ not like that.

Run time Polymorphism

Suppose you have written a base class from which a number of class have been derived,as i understand that,in real life scenario the number of such derived can be overwhelming. To handle objects of each class individually can be very cumbersome not mention near nigh impossible.Run time polymorphism gives us respite from this problem as using the base class pointer we can call functions in derived classes that have been declared virtual in the base class.

It is worth remembering that implementation of a virtual function call rather resembles an indirect function call but with one exception and that is the flexibility in coding that can be achieved by this implementation.

To know more about Polymorphism click on link below

Popular posts from this blog

Resolved : Power BI Report connection error during execution

Getting Below Power BI Report connection error during execution . Error: Something went wrong Unable to connect to the data source undefined. Please try again later or contact support. If you contact support, please provide these details. Underlying error code: -2147467259 Table: Business Sector. Underlying error message: AnalysisServices: A connection cannot be made. Ensure that the server is running. DM_ErrorDetailNameCode_UnderlyingHResult: -2147467259 Microsoft.Data.Mashup.ValueError.DataSourceKind: AnalysisServices Microsoft.Data.Mashup.ValueError.DataSourcePath: 10.10.10.60;T_CustomerMaster_ST Microsoft.Data.Mashup.ValueError.Reason: DataSource.Error Cluster URI: WABI-WEST-EUROPE-redirect.analysis.windows.net Activity ID: c72c4f12-8c27-475f-b576-a539dd81826a Request ID: dfb54166-c78f-4b40-779f-e8922a6687ad Time: 2019-09-26 10:03:29Z Solution: We found report connection not able to connect to SQL Analysis service so tried below option. Re

Song- Khamoshiyan Piano keyboard Chord,Notation and songs Lyrics

All songs notation and chords at one place

Song : O Saathi Re Film : Mukhathar Ka Sikkandhar Uses : C D D# E G A Note : The numbers at the end of the lines indicate line numbers. Pallavi: O saathi re, tere binaa bhi kya jina, tere binaa bhi kya jina A- C D D#....,D D C DD E...C..CA-...,D D C DD E...CC.......1 Play line 1 again phulon men khaliyon men sapnom ki galiyon men GGG...GAGE.. GGG G A G E.................................................2 tere bina kuchh kahin naa E A G E D C D D#.......................................................................3 tere binaa bhi kya jina, tere binaa bhi kya jina D D C DD E....C..CA-..., D D C DDE....CC.............................4 Charanam: har dhadkan men, pyaas hai teri, sanson men teri khushboo hai CCC C D C A-, CCC C D C A-, DDD DED CD EE.. CCCC......................5 is dharthi se, us ambar tak, meri nazar men tu hi tu hai CCC C D C A-, CCC C D C A-, DDD DED CD EE.. CCCC......................6 pyaar yeh tute naa GGG... GAG D#......E.........................