Describe what an Interface is and how it?s different from a
Class.

Answer Posted / seamus barrett

An interface represents a contract between a class and its clients (the classes and functionality that consume the class). A class that implements an interface makes available to it's clients a collection of methods and properties as defined by the interface. As a class evolves (as the code changes) the contract between class and its client remains intact so long as the interface is unchanged. This allows a class to grow without requiring its clients to be rebuilt.

Difference? A class can be instantiated into an object that provides functionality to the instantiating function while an interface cannot be instantiated.

Is This Answer Correct ?    3 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Prepare me a program for the animation of train

2249


What is oops in simple words?

842


What is static in oop?

849


Why do we use class?

858


How to improve object oriented design skills?

788


write a program to enter a string like"sunil is a good boy and seeking for a job" not more than 10 characters including space in one line,rest characters should b in other line.if the next line starts from in between the previous word,then print whole word to next line.

2030


2. Give the different notations for the class.\

1852


Please send ford technologies placement paper 2 my mail id

1878


What does no cap mean?

832


Give two or more real cenario of virtual function and vertual object

2114


INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?

1932


What is the real time example of encapsulation?

825


Which language is not a true object oriented programming language?

909


given a set based questions and 5 questions based on it next data sufficiciency questions 2 and 2/3 english sentence completion with options very easy and 2 synononmys paragraph with 10 questions 10 minutes replace =,-,*,% with -,%,+,* type questions 5 3 questions lik following itssickhere itssickthere itssickhere istsickhere which is nt alike the others very easy

2399


What is difference between pop and oop?

847