About Object Oriented Programming
About Object Oriented Programming
Main Program
When we deal with a program containing
many functions, important data items are String DOB = “8-march-1995”;
applied globally to be used by all the
functions, whereas, a function may contain
Function age
its own local data. Int age ;
Variable used my multiple functions is
known as global data
Variable used within function is known as Function Birthday
String message ;
local data.
Local data is accessible within function only.
More about POP
continue …..
Real World Object Software Object
Class : Car Class : Student
Characteristics : Data member :
Model no String name;
Company name int Roll_no;
No of seats String address;
Behaviour : Member functions :
To travel Admission( )
Pick and drop Examination( )
Message Passing
continue…
Declaration : It uses class as data type along with an object
Examples of attributes :
String name;
int roll_no;
Class as an object factory
Continue …
Types of Inheritance
Polymorphism