GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Concepts  >  OOPS

 Print  |  
Question:  Describe the principles of OOPS

Answer: There are three main principals of oops which are called Polymorphism, Inheritance and Encapsulation


November 11, 2006 02:54:24 #10
 Udhaya Kumar.D   Member Since: Visitor    Total Comments: N/A 

RE: Describe the principles of OOPS
 
Abstraction: An abstract class is a parent class that allows inheritance but can never be instantiated. Abstract classes contain one or more abstract methods that do not have implementation. These abstract methods can be defined in the derived class. Example :public abstract class Parent{ public abstract void add();}public class child : Parent{ public override void add() { }}And not like this:public abstract class Parent{ public abstract void add() { }}public class child : Parent{ public override void add() { }}
     

 

Back To Question