Tuesday, 30 August 2016

Class, Object, encapsulation, abstraction, inheritance, Pol,MP

Q) What are difference between class and object?
Ans):-
1.       class is a group of elements  having common properties and behaviors
               object is an individual elements among the group of elements having physical properties and                    physical behaviors
2.       class is virtual
where as object is physical 
3.       class is virtual encapsulation of properties and behaviors
object is physical encapsulation of properties and behaviors.
4.       Class is generalization.
Object is specialization
5.       Class is a model (or) blueprint for the object
Object is an instance to the class
Date july-13-2016

Q) What is the difference between encapsulation and abstraction?  
Ans);-
The process of binding data and coding part as a single unit is called as encapsulation
Ex:- capsule
The process of visualization necessary implementation and hiding unnecessary implantation is called as Abstraction.
Ex:- Mobile
In java applications, both encapsulation and abstraction are “co-existed and both are able to improve security in java application.
Ex:- Mobile screen (security )

Date july-13-2016
4.       Inheritance
The process of getting variable and method from one class to another class is called as Inheritance.
The main objective of inheritance is code reusability.

5.       Polymorphism
Polymorphism is a Greek word, where ploy means many and morphism  means structure.
It one thing is existing in more then one from then it is called as polymorphism.
The main objective of polymorphism is “Flexibility” to design application.
Ex:-

6.       Message passing
The process of transferring data from one instruction to another instruction along with flow of execution is called as message passing.
The main object of message passing is to import data navigation between entity classes.


No comments:

Post a Comment