Sie sind auf Seite 1von 4

Each person try to give an example for any definition , each use unique example while answering the

questions. OOPS Interview Questions Part -1


Top of Form Bottom of Form

1 Comment by HERO , 21-01-08 at 02:40 PM (17203 Views)

1. List few features of object oriented programming.Object oriented programming features: Follows bottom up approach. Emphasis is on data. Programs are divided into objects. Functions and data are bound together. Communication is done through objects. Data is hidden. 2. List features of procedure oriented programming.Procedure oriented programming features: Follows top down approach. Emphasis is on procedure. Programs are divided into functions. Data moves around freely. 3. What are the basic concepts of OOPs?The following are the basic concepts of OOPs: Classes, Objects, Data abstraction and encapsulation, Polymorphism, Inheritance, Message Passing, and Dynamic Binding. 4. What is a class? Class is an entity which consists of member data and member functions which operate on the member data bound together. 5. What is an object? Objects are instances of classes. Class is a collection of similar kind of objects. When a class is created it doesnt occupy any memory, but when instances of class is created i.e., when objects are created they occupy memory space.

6. What is data encapsulation? Wrapping up of member data and member functions together in a class is called data encapsulation. 7. What is data abstraction? Data abstraction refers to the act of providing only required features and hiding all the non-essential details for usage. 8. What are ADTs? ADTs stand for abstract data types. Classes which provide data abstraction are referred to as ADTs. 9. What is inheritance? The process of inheriting the properties of one object by another object is called inheritance. 10. What is polymorphism? The feature of exhibiting many forms is called polymorphism. 11. What are the steps involved in message passing?The following are the steps involved in message passing: Creating classes, creating objects, and creating communication between objects. 12. What is dynamic binding? The feature that the associated code of a given function is not known till run time is called dynamic binding. 13. What are the advantages of OOP?Data hiding helps create secure programs. Redundant code can be avoided by using inheritance. Multiple instances of objects can be created. Work can be divided easily based on objects. Inheritance helps to save time and cost. Easy upgrading of systems is possible using object oriented systems. 14. Give an example for object based programming language. Ada is an example for object based programming language. 15. Write the features of object based programming language. Data hiding, data encapsulation, operator overloading and automatic initialization and clear up of objects are the important features exhibited by object based programming languages.

Object oriented programming interview questions


Download Oops interview questions and answers
What is OOP? The object oriented programming is commonly known as OOP. Most of the languages are developed using OOP concept. Object-oriented programming (OOP) is a programming concept that uses "objects" to develop a system................... Read answer Test your Oops knowledge with our multiple choice questions! What are the various elements of OOP? Various elements of OOP are: Object, Class , Method Class A class is a collection of data and operations on data. Data and operations / functions / methods are placed together in a single unit, i.e., class. This feature is known as encapsulation................ Read answer What are the characteristics of Object Oriented programming language? Some key features of the Object Oriented programming are: Emphasis on data rather than procedure, Programs are divided into entities known as objects, Data Structures are designed such that they characterize objects............... Read answer What are the basic Concepts used in the Object-Oriented Programming language? Object, Class, Data Abstraction and Encapsulation, Polymorphism.................. Read answer Explain an object, class and Method. An object is an entity that keeps together state and behaviors. For instance, a car encapsulates state such as red color, 900 cc etc and behaviors as 'Start', 'Stop' etc., so does an object................. Read answer Define Encapsulation and Information Hiding in OOP. Encapsulation means keeping actions and attributes together under a single unit. This can also be understood using a motor bike example............. Read answer Explain Inheritance and Polymorphism in OOP. Polymorphism means the ability to take more than one form. An operation may exhibit different

behaviors in different instances.............. Read answer What are the advantages of OOP? It presents a simple, clear and easy to maintain structure. It enhances program modularity since each object exists independently................... Read answer Oops - Jan 12, 2009 at 21:14 PM by Vidya Sagar

What is composition? Explain the purpose of composition.


Assembling existing components instead of creating new ones is called composition. In OOP it is called as objects composition. It is the process of placing object in another object. It is the model of has-a relationship. An employee object can contain an object of type project which is another object. Purpose of composition: A model by value aggregation can be derived by using composition which is semantically equivalent to an attribute. The lifetime is coincident part as a whole for both objects If one part is removed, the whole part also removed with out explicit removal of individual parts Composition can be used to model by-value aggregation which is semantically equivalent to an attribute.

What is an abstraction and why is it important?


Representing essential features by hiding the background process / details. In other words, it is specifying what to do but not how to do. Abstraction is important at the conceptual level of an application. It helps in understanding clearly, what the process and the flow of an application. The abstraction allows the complete flow and development of an application into a structured action. The conceptual level of project execution is derived from abstraction which the gateway for the entire application development.

Das könnte Ihnen auch gefallen