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. ...

Song- Khamoshiyan Piano keyboard Chord,Notation and songs Lyrics

Song Aankhen Khuli Ho lyrics notation

Song : Aankhen Khuli Ho Movie: Mohabbatein Notes used : W=>Western - C D E F G- A- B-/ H=>Hindustani - S R G M P- D- N- ( Here for western, G=G-, A=A-, & B=B- ) ( For hindustani, P=P-, D=D-, & N=N- ) Song I : Aankhen Khuli...Ho Ya.. Ho Bandh W=> A.... C... B..C.. E.. E...... A... A.... H=> D... S... N..S.. G G....... D... D.... Deedaar Un Ka Ho.o.taa Hai.. W=> A...B....A....D.BAG....ADB... H=> D...N...D.....R.NDP...DRN... Kaise Kahoon Main O..Yaaraa W=> B..D.. D....E.... D.....C..C..C... H=> N..R.. R....G... R.....S..S..S..... Ye Pyaar Kaise Hota Hai W=> E...B.....DB...AG...B..AA H=> G...N....RN...DP...N...DD (Tururu ru ru, ru ru rururu ru......) W=> AA...GA...BCE..., B...DB..GA H=> DD...PD...NSG..., N..RN.. PD Song II: Aa.aj He Kisi..par Yaa.ro.on..., Marke De..Khe..gein Hum W=> E....FEDCBABC.D.. D D......., G A B C.... E.......D...D..... H=> G....MGRSNDNS.R. R R......., P D N S.....G........R...R.... Pyaar Ho...