Skip to main content

Posts

Showing posts with the label data abstraction

FEATURES OF C++

FEATURES OF C++ Classes and Objects: Class defines the properties of an object. It is the group of similar objects. It defines data member and member functions. Variables of the class are called objects, each object has it own separate memory. Object is also called instance of a class when it is initialized. Encapsulation: It means binding of data members and member function in a class. Data hiding : We always the data members as private and member functions as public. Private members are not accessible outside the class they can only be accessed through the public member functions. Data Abstraction: We always define the essential properties of an object without going to the background details. ADT(abstract data types): A class defines only the essential properties of an object without going to the background details. Inheritance: We can inherit all the properties of a class instead of redefining all these properties again. Hence, inheritance provides the programmer with ...

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