Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Look up keyword
Like this
0Activity
0 of .
Results for:
No results containing your search query
P. 1
UNIT I

UNIT I

Ratings: (0)|Views: 1 |Likes:

More info:

Published by: Ashwinth Janarthanan Menon on Jun 26, 2012
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PPT, PDF, TXT or read online from Scribd
See more
See less

06/26/2012

pdf

text

original

 
 
Object Oriented ProgrammingObject Oriented Programming
Programmer Programmer 
thinksthinks
about and defines theabout and defines theattributes and behavior of objects.attributes and behavior of objects.
Often the objects are modeled after real-Often the objects are modeled after real-world entities.world entities.
Very different approach thanVery different approach than
function-based function-based 
 programming (like C).programming (like C).
 
 
Object Oriented ProgrammingObject Oriented Programming
Object-oriented programming (OOP)Object-oriented programming (OOP)
 –Encapsulates data (attributes) and functionsEncapsulates data (attributes) and functions(behavior) into packages called classes.(behavior) into packages called classes.
So, Classes are user-defined (programmer-So, Classes are user-defined (programmer-defined) types.defined) types.
 –Data (data members)Data (data members) –Functions (member functions or methods)Functions (member functions or methods)
In other words, they are structures +In other words, they are structures +functionsfunctions
 
 
Classes in C++Classes in C++
Member access specifiersMember access specifiers –public:public:
can be accessed outside the class directly.can be accessed outside the class directly. –The public stuff isThe public stuff is
the interfacethe interface
..
 –private:private:
 Accessible only to member functions of class Accessible only to member functions of class
Private members and methods are for internalPrivate members and methods are for internal
 
useuseonly.only.

You're Reading a Free Preview

Download
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->