1. Overview of Object Oriented Concepts
January-2004 [5]
4.
b) What
Is the difference between overloading and overriding methods? [5]
ans :-- Overloading - Two or more functions having same name but
different siganture(i.e arguements or return types) for eg.
we have a function named as area then
area();,float area();,area(float a,float b);,float area
(float a,float b);
Overriding - When a function of base class is re-defined in
the derived class.for eg.
base class
{
area(float a,float b);
}
derive class
{
float area();
}
Overloading is compile time binding, where as overriding is
dynamic binding.....
* in overloading function name are same but signatures
(argument) are different .
while in overriding function name are as well as argument
are same in drive class as in super class.
* for overloading can be done in one class but
for overriding there is necessary that at least two class
should be present.
Overloading is compile time binding, where as overriding is
dynamic binding.
overriding is done in the base class where the parent class
method is overridden by a method of the same signature.
Overloading is done in the same class on functions with
input parameters differing in number or type.
It does not block superclass method it will override the
super class method
The main difference between overloading and overriding is
that in overloading we can use same function name with
different parameters for multiple times for different tasks
with on a class.
and overriding means we can use same name fiunction name
with same parameters of the base class in the derived class.
this is also called as reusability of code in the programme.
1. In overloading,there is a relation ship between methods
available in the same class where as in overridding,there
is relationship between a super class method and subclass
method.
2. overloading doesn't block inheritence from the
superclass where as overridding blocks inheritence.
3. in overloading,seperate methods share the same name
where as in overridding,subclass methods replaces the
superclass.
4.overloading must have different method signatures where
as overriding must have same signature.
January-2005 [14]
1. Briefly explain the following:
a) How does object-oriented programming
style offer better reusability of code than modular programming? [4]
d) How is method-overriding different from
method-overload? [4]
c) Why do we talk about message-dispatch
in object-oriented systems rather than a function-call? [4]
2.
a) What distinguishes an ADT from a class?
[2]
July-2005 [4]
4.
c) How a DBMS exploits encapsulation in
implementing support for Abstract Data Types (ADTs). [4]
January-2006 [32]
1. Briefly
explain the following:
b) Define
classes, abstract classes and interfaces and explain their utility. [4]
e) Distinguish between a
function call and message dispatch. [4]
f) Distinguish between method
overloading and method-overriding. [4]
g) Explain static and dynamic
binding. [4]
2.
c) Define
inheriting rule, subtype rule and method selection rule. Explain with
examples. [6]
3.
a) Distinguish between procedural programming
paradigm and object-oriented programming paradigm. What are the benefits of
object-oriented programming over procedural programming? [4]
b) Explain
static and dynamic polymorphism with suitable examples. [6]
July-2006 [8]
1.
a) What is the purpose of inheritance? How
does object oriented technique help produce flexible and extensible software? [4]
b) What are the advantages of polymorphism
and dynamic binding? [4]
January-2007 [10]
1.
e) How does DBMS exploit the encapsulation
in implementing support of ADTs? [4]
4.
c) How does a DBMS exploit encapsulation
in implementing support for Abstract Data Types (ADTs)? [6]
July-2007 [4]
1.
e) Differentiate between Overriding and
Overloading with suitable example. [4]
January-2008 [12]
1.
a) Abstraction is a fundamental human
capability that permits us to deal with complexity. Justify this statement. [4]
c) Give reasons why it is necessary to
override a feature in object oriented programming. [4]
2.
c) Differentiate between overloading and
overriding of methods in object oriented programming with suitable examples.
Explain using C++ code. [4]
No comments:
Post a Comment