Quiz


1.  

What is polymorphism?

polymorphism technically means that one thing has the ability to take many shapes. in programming terms, the thing is the name of a method and the shape is the behavior performed by the method.

2.  

How is polymorphism implemented?

polymorphism is implemented by overloading a method or by using virtual functions.

3.  

What is late binding?

late binding is the binding of a method call to a method definition and is performed at run time if some information is missing at compile time that is known only when the application runs.

4.  

What is early binding?

early binding is the binding of a method call to a method definition and is performed at compile time if all the information is available at compile time.

5.  

What is the advantage of run-time polymorphism?

the advantage of run-time polymorphism is that a program can respond to events that occur during execution.

6.  

What is the advantage of compile-time polymorphism?

the advantage of compile-time polymorphism is that no time is lost in binding when the program runs because binding is completed when the executable program is created.

7.  

What is an interface?

an interface specifies a standard method name, argument list, return value, and behavior. programmers who develop classes and methods define methods that adhere to an interface.

8.  

How does polymorphism enable the implementation of an interface?

polymorphism permits an interface to be defined as a set of standard methods and behaviors by using overloaded methods and virtual methods.

9.  

What is a virtual function?

a virtual function is a placeholder for the real function that is defined when the programming is running.

10.  

What is overloading a method?

overloading is a technique for implementing polymorphism by defining two or more methods with the same name but different argument lists.

Answers

1.  

Polymorphism technically means that one thing has the ability to take many shapes . In programming terms, the thing is the name of a method and the shape is the behavior performed by the method.

2.  

Polymorphism is implemented by overloading a method or by using virtual functions.

3.  

Late binding is the binding of a method call to a method definition and is performed at run time if some information is missing at compile time that is known only when the application runs.

4.  

Early binding is the binding of a method call to a method definition and is performed at compile time if all the information is available at compile time.

5.  

The advantage of run-time polymorphism is that a program can respond to events that occur during execution.

6.  

The advantage of compile-time polymorphism is that no time is lost in binding when the program runs because binding is completed when the executable program is created.

7.  

An interface specifies a standard method name, argument list, return value, and behavior. Programmers who develop classes and methods define methods that adhere to an interface.

8.  

Polymorphism permits an interface to be defined as a set of standard methods and behaviors by using overloaded methods and virtual methods.

9.  

A virtual function is a placeholder for the real function that is defined when the programming is running.

10.  

Overloading is a technique for implementing polymorphism by defining two or more methods with the same name but different argument lists.




OOP Demystified
OOP Demystified
ISBN: 0072253630
EAN: 2147483647
Year: 2006
Pages: 130

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net