Object-Oriented Programming Concepts:

The object-oriented paradigm is built on the foundation laid by the structured programming concepts. The fundamental change in OOP is that a program is designed around the data being operated upon rather upon the operations themselves. Data and its functions are encapsulated into a single entity.OOP facilitates creating reusable code that can eventually save a lot of work. A feature called polymorphism permits to create multiple definitions for operators and functions. Another feature called inheritance permits to derive new classes from old ones.

Object-Oriented Programming introduces many new ideas and involves a different approach to programming than the procedural programming.
Benefits of object-oriented programming:
1. Data security is enforced.
2. Inheritance saves time.
3. User-defined data types can be easily constructed.
4. Inheritance emphasizes inventions of new data types.
5. Large complexity in the software development can be easily managed.

Basic C++ Knowledge:
C++ began its life in Bell Labs, where Bjarne Stroustrup developed the language in the early 1980s. C++ is a powerful and flexible programming language. Thus, with minor exceptions, C++ is a superset of the C Programming language. The principal enhancement being the object-oriented concept of a class. A Class is a user-defined type that encapsulates many important mechanisms. Classes enable programmers to break an application up into small, manageable pieces, or objects.


Basic concepts of Object-oriented programming:

Object: Objects are the basic run-time entities in an object-oriented system. They may represent a person, a place, a bank account, a table of data or any item that the program has to handle.

class: The entire set of data and code of an object can be made of a user-defined data type with the help of a class in fact Objects are variables of the type class. Once a class has been defined, we can create any number of objects belonging to that class. A class is thus a collection of objects of similar type.
For example: mango, apple, and orange are members of the class fruit.
ex:
fruit mango;
will create an object mango belonging to the class fruit.

Data Abstraction and Encapsulation:
the wrapping up of data and functions into a single unit is known as encapsulation. Data encapsulation is the most striking feature of a class. The data is not accessible to the outside world and only those functions which are wrapped in the class can access. This insulation of the data from direct access by the program is called data hiding.

Abstraction :
Abstraction refers to the act of representing essential features without including the background details or explanations. since the classes use the concept of data abstraction, they are known as abstract data type(ADT).

Inheritance :
Inheritance is the process by which objects of one class acquire the properties of objects of another class.
for example:
The bird 'robin ' is a part of the class 'flying bird' which is again a part of the class 'bird'. The concept of inheritance provides the idea of reusability.

Polymorphism:
Polymorphism is another important oop concept. Polymorphism means the ability to take more than one form.an operation may exhibit different instances. The process of making an operator to exhibit different behaviours in different instance is known as operator overloading.

Input/output Statements::
cout<<”example”;
cin>>n;

class definition:
class definition has two components: the class head, the class body.
class vector //the class head
{
// all class members
};



Thanks
Mukesh Rajput
Mukesh Rajput

Mukesh Rajput

I am a Computer Engineer, a small amount of the programming tips as it’s my hobby, I love to travel and meet people so little about travel, a fashion lover and love to eat food, I am investing a good time to keep the body fit so little about fitness also..

Post A Comment:

0 comments: