|
INTERVIEW QUESTIONS
CONCEPTS AND ARCHITECTURE
OOPS
DETAILS
Question: What Is an Interface?
Answer: objects define their interaction with the outside world through the methods that they expose. Methods form the object's interface with the outside world; the buttons on the front of your television set, for example, are the interface between you and the electrical wiring on the other side of its plastic casing. You press the "power" button to turn the television on and off.
In its most common form, an interface is a group of related methods with empty bodies. A bicycle's behavior, if specified as an interface, might appear as follows:
interface Bicycle {
void changeCadence(int newValue);
void changeGear(int newValue);
void speedUp(int increment);
void applyBrakes(int decrement); }
|
|
|
Category |
OOPS Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 8209 users |
Added on |
8/26/2014 |
Views |
66276 |
Rate it! |
|
|
Question:
What Is an Interface?
Answer:
objects define their interaction with the outside world through the methods that they expose. Methods form the object's interface with the outside world; the buttons on the front of your television set, for example, are the interface between you and the electrical wiring on the other side of its plastic casing. You press the "power" button to turn the television on and off.
In its most common form, an interface is a group of related methods with empty bodies. A bicycle's behavior, if specified as an interface, might appear as follows:
interface Bicycle {
void changeCadence(int newValue);
void changeGear(int newValue);
void speedUp(int increment);
void applyBrakes(int decrement); } Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
What Is Inheritance?
|
View Answer
|
|
What Is a Class?
|
View Answer
|
|
Explain about a class?
|
View Answer
|
|
Explain about the Design Phase?
|
View Answer
|
|
Explain the implementation phase with respect to OOP?
|
View Answer
|
|
Explain what is an object?
|
View Answer
|
|
Explain about Object oriented programming?
|
View Answer
|
|
Explain the rationale behind Object Oriented concepts?
|
View Answer
|
|
How object oriented concept is implemented in cell phone?
|
View Answer
|
|
How is memory allocated by new ? a) In a heap b) in a stack b) both a & b c) None of these.
|
View Answer
|
|
How to implement the runtime polymorphism using c++. examples.
|
View Answer
|
|
Can we inherit private members of class ?
|
View Answer
|
|
Explain the Inheritance principle
|
View Answer
|
|
What is OOPS?
|
View Answer
|
|
Describe the principles of OOPS
|
View Answer
|
|
Explain the Encapsulation principle
|
View Answer
|
|
Explain the different forms of Polymorphism.
|
View Answer
|
|
Explain the Polymorphism principle.
|
View Answer
|
|
What is the use/advantage of function overloading
|
View Answer
|
|
while copying the objects if you say X a = b and asssume that '=' operator is overloaded then what it will call, a copy constructor or operator overloading function
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All OOPS Interview Questions & Answers - Exam Mode /
Learning Mode
|