You are on page 1of 3

Questions on object Oriented Concepts

1.) What are the features and advantages of OBJECT ORIENTED PROGRAMMING? One of the main advantages of OO programming is its ease of modification; Objects can easily be modified and added to a system there by reducing maintenance costs. OO programming is also considered to be better at modeling the real world than is procedural programming. It allows for more complicated and flexible interactions. OO systems are also easier for non-technical personnel to understand and easier for them to participate in the maintenance and enhancement of a system because it appeals to natural human cognition patterns. For some systems, an OO approach can speed development time since many objects are standard across systems and can be reused. Components that manage dates, shipping, shopping carts, etc. can be purchased and easily modified for a specific system.

2.) what is an object ? An object is any thing that is existing in the real world that have properties(variables) and actions (functions or methods). 3.) what is a class ? A class is a template or model which has state (variables or properties) and behavior (functions or methods) A class is an abstract idea where as objects are physically exists 4.) what is data encapsulation ? Bundling up of data and methods as a single unit is called encapsulation. is different from (example) -- Same name can be used but each data is different and different memory is allocated. 5.) what is data abstraction ? Hiding unnecessary data from user is called abstraction (user need to know what to do with a method, but does not need to know how a method is implemented). 6.) what is Inheritance ? Producing a new class from existing class is called inheritance. It acquires all the qualities of the parent and also it can have its own features. 7.) what is Polymorphism ? Poly means many morphosis means forms. If same method performs various tasks or existing in different forms, it can be called polymorphism. 8.) what is interface ?

It is an contract between user and developer of the class. It tells the way how the user should use the class and developer how to implement the class. Generally Interfaces are developed by the designers of the component. Interface is a specification of method prototypes. We cannot create an object to interface. 9.) what is over-ridding ? writing two or more methods with same name & same method signature in super and sub classes is called over-ridding. The sub class overrides the super class method. (dynamic polymorphism, late binding, run time). Code refinement. 10.) what is over-loading? writing two or more methods with same name but different method signature is called overloading. Code replacement. (static polymorphism, early binding, compile time) 11.) what is up-casting ? Converting one data type into another is called casting or type-casting. Moving up in inheritance chain from sub class to super class is called up-casting Person p = new Student(); //here Person is super class and student is sub class. 12.) what is down-casting? Coming down from Super class to sub class is called down-casting Object obj = new Object(); MyObject myObj = (MyObject)obj; //since Object is super class of all the classes.

Object obj; // creating a reference obj = new Object (); // creating an object Variables in Object Oriented Programming Instance variables Static variables Local variables Parameterized variables Reference variables

Data Types Primitive Data Types int, float, long, double, char, boolean User defined Data Types All the collection objects and classes are user defined data types Access Specifiers public, private, protected, default (in Java, .NET) global, public, private, protected (in Apex) 2.) Questions on data structures (and even design patterns) 3.) Questions on important interview programs (study Java, Spring, Hibernate, EJB 3.0) 4.) Questions on Database fundamentals 5.) Questions on PHP, AJAX, Java Script, DOM 6.) Questions on CSS 7.) Questions on JQuery 8.) Questions on REST WebServices