Jump to content

Programming Vachina Vallu Okasari It Randi


Recommended Posts

Posted

Given the the C++ classes, which of the following statements is/are true about accelerate(...) and consumeFuel(...) methods of Vehicle?


(Select all that apply)
class Vehicle
{

protected:
void start();
void stop();
virtual void accelerate(int speed);
virtual void consumeFuel(int mpg);
public:
....
};
class Car: public Vehicle
{
protected:
....
public:
....
};

Choose at least one answer.
A. Are inherited by the derived class (Car).
B. Can not be inherited by the derived class (Car).
C. Are always required to (MUST) be overriden by the derived class (Car).
D. Support dynamic (late) binding.
E. May be overloaded by the derived class (Car) if need be.


Koncham ee answer ento cheppandi...Thank you

  • Replies 42
  • Created
  • Last Reply

Top Posters In This Topic

  • ammulu

    8

  • Spartan

    6

  • galigannarao

    6

  • barre

    3

Popular Days

Top Posters In This Topic

Posted

[quote name='ammulu' timestamp='1324071150' post='1301157004']
Given the the C++ classes, which of the following statements is/are true about accelerate(...) and consumeFuel(...) methods of Vehicle?


(Select all that apply)
class Vehicle
{

protected:
void start();
void stop();
virtual void accelerate(int speed);
virtual void consumeFuel(int mpg);
public:
....
};
class Car: public Vehicle
{
protected:
....
public:
....
};

Choose at least one answer.
A. Are inherited by the derived class (Car).
B. Can not be inherited by the derived class (Car).
C. Are always required to (MUST) be overriden by the derived class (Car).
D. Support dynamic (late) binding.
E. May be overloaded by the derived class (Car) if need be.


Koncham ee answer ento cheppandi...Thank you
[/quote]

none of the above leda
[url=http://www.desigifs.com/gifs/1226/brahmanandam][img]http://www.desigifs.com/sites/default/files/brahmam_buildup5_0.gif[/img][/url]

Posted

[quote name='sujithrede' timestamp='1324071323' post='1301157026']

none of the above leda
[url="http://www.desigifs.com/gifs/1226/brahmanandam"][img]http://www.desigifs.com/sites/default/files/brahmam_buildup5_0.gif[/img][/url]
[/quote]

unte cheppedhanni kadha :P

Posted

see this similar example:

[url="http://www.tenouk.com/download/Module14.txt"]http://www.tenouk.co...ad/Module14.txt[/url]

[url="http://www.codersource.net/c/c-tutorials/c-tutorial-on-inheritance.aspx"]http://www.codersource.net/c/c-tutorials/c-tutorial-on-inheritance.aspx[/url]

Posted

[quote name='k2s' timestamp='1324071375' post='1301157036']
see this similar example:

[url="http://www.tenouk.com/download/Module14.txt"]http://www.tenouk.co...ad/Module14.txt[/url]
[/quote]

oka option cheppava

Posted

[quote name='ammulu' timestamp='1324071401' post='1301157038']

oka option cheppava
[/quote]

:3D_Smiles:

Posted

[quote name='ammulu' timestamp='1324071356' post='1301157031']

unte cheppedhanni kadha :P
[/quote]

[url=http://www.desigifs.com/gifs/102/pawan-kalyan][img]http://www.desigifs.com/sites/default/files/Pawan Gifss (26).gif[/img][/url]

Posted

[quote name='k2s' timestamp='1324071456' post='1301157044']

:3D_Smiles:
[/quote]

ala kadhu kani...answer chepppava..please

vallaki exam time ayipothundhi sSc_hidingsofa

Posted

C++ marchipoya.

kaani, according to OOPS concept, option A is correct as child class is deriving from base class so the base class methods will be available as they r under protected in base class.


option E is also possible

Posted

[quote name='ammulu' timestamp='1324071520' post='1301157057']

ala kadhu kani...answer chepppava..please

vallaki exam time ayipothundhi sSc_hidingsofa
[/quote]

ee link lo unnadi sadavali..... [url="http://www.codersource.net/c/c-tutorials/c-tutorial-on-inheritance.aspx"]http://www.codersource.net/c/c-tutorials/c-tutorial-on-inheritance.aspx[/url]

Posted

[quote name='Maddy_Rulez' timestamp='1324071682' post='1301157077']
C++ marchipoya.

kaani, according to OOPS concept, option A is correct as child class is deriving from base class so the base class methods will be available as they r under protected in base class.
[/quote]

virtual ani define cheste they may be overridden in the derived class

Posted

A E.....

C. Are always required to (MUST) be overriden by the derived class (Car)...e option lo....always lekapote...C kuda add seskovachu...

×
×
  • Create New...