Oops
Oops
-----------------------------
class
object
polymorphism
encapsulation
inheritance
data abstraction
--------------------
class and objects :class is collection of attributes and behaviour.
object is an instance of a class
ex:
animal---->dog,cat,lion.............
student--->ram,raju,sita...........
class
-------
1.class is collection of variables and methods
2.class is logical entity/blue print
3.will not occupy any space in the memory
syntax:
class employee
{
variables
methods
}
object
---------
1.object is an instance of a class/object will be created by using class
2.object is physical entity
3.occupy space in memory
4.we can create multiple objects for single class
syntax: