object eg:chair
class eg:class class_name
data abstraction eg:to abstract one substance
data encapculation grouping of essintial details
inheritence eg:
polymorphisum
dynamic binding
message communication
1.Encapsulation-means wrapping or grouping data in single e
unit.
e.g. if you are planning to do computer course in a
institute but you don't know which course is going on in the
institute.But they have printed paper in which all the
courses are written like java,.net etc. This is called
encapsulation.
2.Abstraction-means hiding non essential information.
e.g.-Consider the above example.you have decided for java
the you enters in the institute and tell your course.The
person will explain you about java like duration;fee
structure etc.In simple words abstraction means information
according to the user.
3.Polymorphism-different existence.
e.g-you are a son,brother,uncle,husband and friend at
different situation.
OOP'S ~ Itz nothing but Object Oriented Programing
It mainly consist of
1.objects - these are the basic run time antities in object oriented system.They may represent a place,person or a data that the programer has to handle.
2.class - It is a collection of items.Itz decleration is same as of structure.The body of class is enclosed within '{}' & terminated by ';'.The class body contains the decleration of varible &function.
3.Inheritance - It is the process by which object of one class aquire the property of another class.
4.polymorphism - In this an operation may show different behaviour in different instance.
5.Encapsulation - The binding of data & function into a unit called as class n this is known as encapsulation
6.Abstraction - It refers to the act of represending the essential features without including the background details.
7.Dynamic binding - It means that the program code associated with a given procedure call is not known untill the time of call
* Objects
* Classes
* Inheritance
* Data Abstraction
* Data Encapsulation
* Polymorphism
* Overloading
* Reusability
In order to understand the basic concepts in C++, the
programmer must have a command of the basic terminology in
object-oriented programming. Below is a brief outline of the
concepts of Object-oriented programming languages:
Objects:
Object is the basic unit of object-oriented programming.
Objects are identified by its unique name. An object
represents a particular instance of a class. There can be
more than one instance of an object. Each instance of an
object can hold its own relevant data.
An Object is a collection of data members and associated
member functions also known as methods.
Classes:
Classes are data types based on which objects are created.
Objects with similar properties and methods are grouped
together to form a Class. Thus a Class represent a set of
individual objects. Characteristics of an object are
represented in a class as Properties. The actions that can
be performed by objects becomes functions of the class and
is referred to as Methods.
For example consider we have a Class of Cars under which
Santro Xing, Alto and WaganR represents individual Objects.
In this context each Car Object will have its own, Model,
Year of Manufacture, Colour, Top Speed, Engine Power etc.,
which form Properties of the Car class and the associated
actions i.e., object functions like Start, Move, Stop form
the Methods of Car Class.
No memory is allocated when a class is created. Memory is
allocated only when an object is created, i.e., when an
instance of a class is created.
Inheritance:
Inheritance is the process of forming a new class from an
existing class or base class. The base class is also known
as parent class or super class, The new class that is formed
is called derived class. Derived class is also known as a
child class or sub class. Inheritance helps in reducing the
overall code size of the program, which is an important
concept in object-oriented programming.
Data Abstraction:
Data Abstraction increases the power of programming language
by creating user defined data types. Data Abstraction also
represents the needed information in the program without
presenting the details.
Data Encapsulation:
Data Encapsulation combines data and functions into a single
unit called Class. When using Data Encapsulation, data is
not accessed directly; it is only accessible through the
functions present inside the class. Data Encapsulation
enables the important concept of data hiding possible.
Polymorphism:
Polymorphism allows routines to use variables of different
types at different times. An operator or function can be
given different meanings or functions. Polymorphism refers
to a single function or multi-functioning operator
performing in different ways.
Overloading:
Overloading is one type of Polymorphism. It allows an object
to have different meanings, depending on its context. When
an exiting operator or function begins to operate on new
data type, or class, it is understood to be overloaded.
Reusability:
This term refers to the ability for multiple programmers to
use the same written and debugged existing class of data.
This is a time saving device and adds code efficiency to the
language. Additionally, the programmer can incorporate new
features to the existing class, further developing the
application and allowing users to achieve increased
performance. This time saving feature optimizes code, helps
in gaining secured applications and facilitates easier
maintenance on the application.
The implementation of each of the above object-oriented
programming features for C++ will be highlighted in later
sections.
there are type of oops concepts are there
1.objects/ class
1.Encapsulation
3.Abstraction
4.Polymorphism
5.Inheritance
6.Message passing
7.Dynamic binding
abstraction is the process by which data and programs are
defined with a representation similar to its meaning.
reduce and factor out details to focus on few concepts
at a time.
oops means Object Oriented Programming Language.It's
combined with Data And Procedures.........
OOPs have following features
1.Class $ Object--Encapsulation.
2.Function Overloading
> > Polymorphism
Function Overriding
3.Hierarchical--Inheritance
oops....its a object oriented concept....
this concept is used in different language for reducing line
of code,complexity..
oops having 4 important pillar.
1)Abstraction:
*Hide unnecessary data and show only important think.
*we can create method of abstract class if method is
Abstract method.
2)Encapsulation:
* Binding data and provide security.
ex..
create
class A
{
}
class A binding all methods,variable etc..
and provide security.
3)Polymorphism
same think but behave differently..
Same method name but different parameter...
ex..Method A(int a,int b)//A method name and 2 parameter.
{
}
Method A(int a,int b,int c)//A method name and 3 parameter.
{
}
4)Inheritance
Ability to create new class from existing class...
*inheritance variable,method from existing class
ex..
class A
{
int a,b,c;
}
class B:A
{
}
so we dont need to declare these variable again class B bcoz
these variable inherit from existing class .