UNDERSTANDING C++ BETTER : UNDERSTANDING C++ BETTER Objectives
A brief History.
Introduction to OOPs.
Concept of Classes.
Visit www.onlinehub.co.in for more sessions.
OOPs : OOPs Object Oriented Programming.
Where we have a different approach to a program.
A problem is perceived as Objects or entities .
P.S. for reference to variables, declaration structure ofa program refer here:-
http://www.cplusplus.com/doc/tutorial/structures/
http://www.cplusplus.com/files/tutorial.pdf
Classes : Classes A class is a template based on which real life objects can be created like a human, a shape, an automobile etc.
Class automobile
Wheels
Body
Brakes
Acceleration etc.
Objects : Objects Real objects instantiated from the classes are objects like
Automobile truck.
A truck is an object or an instance of class Automobile, and in turn will possess all the characteristics and functionality define within the class Automobile.
Access Specifiers : Access Specifiers Public.
Private.
Protected.
Declaring a Class : Declaring a Class Class Automobile
{
Private
Int wheel;
Public:
Void accelerate()
{
}
Void brake()
{
}
};
Scope Resolution Operator : Scope Resolution Operator Class can be defined outside the class also using scope resolution operator. ::
Automobile::Accelerate()
{
}