|
![]() | Help |
You are here: Rediff Home » India » Get Ahead » Careers |
|
If you aspire to work in the field of IT, one of the most important concepts you are expected to know is OOP (Object Oriented Programming). However, the technical interview can be nerve-wracking for even the most seasoned IT professional. To help you better prepare for just that, you need know how to present your answers in the best possible way, to impress the interviewer. Get Ahead invited CareerRide to provide answers to some of the basic and most commonly asked questions on OOP. Here's a look at some of the questions you should be prepared for. ~ What is OOP? A programming object has an ability to perform actions and has attributes. It performs just like real world entities for eg a motor bike. A bike performs actions such as 'start', 'stop' etc, and it has attributes like being red in colour, 150 cc etc. So does an Object. Actions and attributes are represented by Methods and fields or properties respectively in programming language. An object hides the implementation details and exposes only the functionalities and parameters it requires to its client. Here also an object shares the same concept as that of a bike. While driving a motor bike, we are unaware of its implementation details such as how it is developed, internal working of gears etc? We know only the functions or actions it can perform. ~ What are the various elements of OOP?
~ Explain an object. An object is an instance of a class. If you consider 'dog' as a class, it will contain all possible dog traits, while an object say a 'German Shepherd' contains characteristics of specific type of dog. ~ Define a class. ~ What is Method? ~ Explain Encapsulation concept in OOP. In a programming language, methods and properties that correspond to actions and attributes respectively are kept under a unit called object. The advantage of encapsulation is that the implementation is not accessible to the client. The user has to know only the functionality of encapsulated unit and information to be supplied to get the result. ~ What is Information Hiding in OOP? You can understand the advantage of the information hiding concept from this example. If a bike manufacturer allows direct access to piston, it would be very difficult to control the actual actions of the piston. ~ Define Inheritance. This concept can also be related to real world entity. A bike manufacturer uses the same mechanism of the existing version of the bike while launching a new version with some added functionalities. This allows him to save time and effort. ~ Explain the term Polymorphism. ~ What is Overloading Polymorphism? ~ Explain Overriding Polymorphism. ~ What are the advantages of OOP?
CareerRide provides answers to questions asked in technical and personal interviews. |
![]() ![]() |
|
© 2008 Rediff.com India Limited. All Rights Reserved. Disclaimer | Feedback |