0% found this document useful (0 votes)
38 views6 pages

it-304-object-oriented-programming-and-methodology-jun-2020 (1)

Bsbsnsnssnnsn

Uploaded by

Rishi Nk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views6 pages

it-304-object-oriented-programming-and-methodology-jun-2020 (1)

Bsbsnsnssnnsn

Uploaded by

Rishi Nk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

https://www.rgpvonline.

com

Total No. of Questions : 8] [1] [Total No. of Printed Pages : 6

Roll No ..................................
IT-304-CBGS
B.Tech., III Semester
Examination, June 2020
Choice Based Grading System (CBGS)
Object Oriented Programming and Methodology
Time : Three Hours
Maximum Marks : 70
Note: i) Attempt any five questions.
{H$Ýht nm±M àíZm| H$mo hb H$s{OE&
ii) All questions carry equal marks.
g^r àíZm| Ho$ g_mZ A§H$ h¢&
iii) In case of any doubt or dispute the English version
question should be treated as final.
{H$gr ^r àH$ma Ho$ g§Xho AWdm {ddmX H$s pñW{V ‘| A§JO
o« r ^mfm
Ho$ àíZ H$mo A§{V‘ ‘mZm Om¶oJm&

1. a) What do you understand by term ‘object oriented


programming’? What are its different characteristics?
Explain and define various OOP concepts in brief.
‘Object oriented programming’ go Amn ³¶m g‘PVo h¡?
BgHo$ {d{^Þ JwUY‘© ³¶m-³¶m h¡? OOP Ho$ {d{^Þ g§H$ënZmAm|
H$mo n[a^m{fV H$a| VWm CZH$s g§jon ‘| ì¶m»¶m H$s{O¶o&

IT-304-CBGS PTO

https://www.rgpvonline.com
https://www.rgpvonline.com

[2]

b) Explain the difference between procedural programming


languages and object oriented programming language.
What are the merits and demerits of object oriented
methodologies? Explain them in brief.
Procedural programming languages Ed§ object oriented
programming language Ho$ ‘ܶ A§Vamo H$s ì¶m»¶m H$s{O¶o&
object oriented àH«$‘ Ho$ JwU Ed§ Xmof ³¶m h¡? g§jon ‘| CZH$s
ì¶m»¶m H$s{O¶o&
2. a) Discuss the role of Cout and Cin in detail. Why they are
used in C++ and from which class they belong to? Explain
in detail.
Cout Am¡a Cin H$s ^y{‘H$m H$s {dñV¥V ì¶m»¶m H$a|& C++ ‘| BZH$m
³¶m| à¶moJ {H$¶m OmVm h¡ VWm ¶o {H$g class go g§~§Y aIVo h¡?
{dñVma go ì¶m»¶m H$s{O¶o&
b) Explain in detail about the various control and looping
statements in object oriented programming. Write the
syntax and property of several control statements? Where
and when do while loop and for loop is used? Differentiate
between them.
Object oriented programming ‘| {d{^Þ Vah Ho$ control Ed§
looping statements ~mao ‘| {dñV¥V ì¶m»¶m H$s{O¶o& Hw$N> control
statements Ho$ {dݶmg Ed§ JwUY‘m] H$mo {bI|& H$~ Ed§ H$hm± do
while loop Am¡a for loop H$m à¶moJ {H$¶m OmVm h¢? BZHo$ ~rM Ho$
A§Vam| H$mo {bI|&
3. a) Explain the role of constructor and destructor in a class.
What are the different types of constructors in C++?
Write the appropriate syntax for the copy constructor and
parameterized constructors.

IT-304-CBGS PTO
Contd...

https://www.rgpvonline.com
https://www.rgpvonline.com

[3]

{H$gr class ‘| constructor Ed§ destructor H$s ^y{‘H$m H$s ì¶m»¶m


H$s{O¶o& C++ ‘| Ho$ {d[^Þ àH$ma Ho$ constructor ³¶m-³¶m h¢?
Copy constructor VWm parameterized constructor Ho$ {bE
C{MV {dݶmg H$mo {bI|&
b) Write a C++ program to show the concept of class, object
and calculate the area of rectangle, square and circle by
using function overloading. Define scope and life of any
variable.
Function overloading H$s ‘XX Ûmam Am¶V, dJ© Ed§ d¥V H$m
joÌ’$b kmV H$aZo Ho$ {bE class Ed§ object H$s g§H$ënZm H$mo
Xem©Vo hþE EH$ C++ program H$mo {bI|& {H$gr variable H$s
scope Ed§ life H$mo n[a^m{fV H$s{O¶o&

4. a) What are the inline functions and what are the benefits of
declaring any function as inline? How any function is made
inline? Give its syntax.
Inline functions ³¶m h¢? {H$gr function H$mo inline Kmo{fV
H$aZo go ³¶m ’$m¶Xo h¢? {H$gr function H$mo inline H¡$go ~Zm¶m
OmVm h¡? BgHo$ {dݶmg H$mo {bI|&
b) Discuss the term ‘polymorphism’ in detail. What are the
different ways to implement polymorphism in C++?
Explain them in brief. Differentiate between compile
time and run time polymorphism.
Polymorphism nX H$mo {dñV¥V ê$n go ~VmB¶o& Polymorphism
H$mo C++ ‘| bmJw H$aZo Ho$ {d{^Þ VarHo$ H$m¡Z-H$m¡Z go h¢? BZ g^r
H$r g§jon ‘| ì¶m»¶m H$a|& Compile time Ed§ Run time
Polymorphism Ho$ ‘ܶ A§Va ~VmB¶o&

IT-304-CBGS PTO

https://www.rgpvonline.com
https://www.rgpvonline.com

[4]

5. a) Explain the fundamental concept behind ‘inheritance’ in


object oriented programming by taking an suitable
example. Define multiple, multilevel and hybrid
inheritance with proper diagram and syntax.
Object oriented programming ‘| inheritance H$s nrN>o H$s
‘yb g§H$ënZm H$mo EH$ C{MV CXmhaU boH$a ì¶m»¶m H$ao& Multiple,
Multilevel Ed§ hybrid inheritance H$mo aoIm{MÌ VWm {dݶmg Ho$
Ûmam n[a^m{fV H$s{O¶o&
b) Explain the concept of ‘Operator overloading’ in detail
and with proper syntax show how unary and binary operator
are overloaded? What are its advantages? Write a C++
program to overload ‘+’ operator using member function
to add two complex numbers.
Operator overloading g§H$ënZm H$s {dñV¥V ê$n go ì¶m»¶m
H$s{O¶o Ed§ C{MV {dݶmg Ho$ gmW {XImBE {H$g àH$ma unary
operator VWm binary operator H$mo overload {H$¶m OmVm h¡?
BgHo$ ³¶m ³¶m ’$m¶Xo h¡? ‘+’ H$mo member function go overload
H$aVo hþE Xmo complex number H$mo OmoS>Zo Ho$ {bE EH$ C++
program H$mo {bI|&

6. a) What are the access modifiers? How many types of access


modifiers are available in C++? Explain each of them and
their role in implementing the data hiding in object
oriented programming.
Access modifiers ³¶m h¢? BgHo$ {H$VZo àH$ma C++ ‘| CnbãY
h¢? BZ g^r H$s data hiding H$mo object oriented programming
‘| bmJw H$aZo ‘| ^y{‘H$m ~VmVo hþE ì¶m»¶m H$s{O¶o&

IT-304-CBGS PTO
Contd...

https://www.rgpvonline.com
https://www.rgpvonline.com

[5]

b) What do you mean by the term ‘base class’ and ‘derived


class’? Explain the difference in deriving any class through
public inheritance and through private inheritance.
Base class VWm derived class go Amn ³¶m g‘PVo h¡? {H$gr
class H$mo public inheritance VWm Ho$ private inheritance Ûmam
derive H$aZo ‘| A§Va H$s ì¶m»¶m H$a|&

7. a) Explain the concept of ‘Pointer’ and its types. What are


the usage of ‘new’ and ‘delete’ operator in terms of
memory management in C++. Write a program in C++ to
show the concept of function pointer and accessing any
element of an array through pointer.
Pointer VWm CZHo$ àH$mam| H$s ì¶m»¶m H$s{O¶o& C++ ‘| new Ed§
delete’ operator H$s memory management Ho$ gÝX^© ‘| ³¶m
Cn¶mo{JVm h¡? C++ ‘| EH$ program {bI|, {Og‘| function
pointer g§H$ënZm H$mo Xem©¶m Om gHo$ VWm array Ho$ {H$gr element
H$mo Pointer Ho$ Ûmam nhþ±Mm Om gHo$&

b) Explain the concept of virtual function, friend function


and static function by writing its syntax. Also discuss the
role of ‘virtual function’ and ‘abstract class’.
Virtual function, friend function Am¡a static function H$s
g§H$ënZm H$s ì¶m»¶m CZHo$ {dݶmg H$mo {bI H$a H$s{O¶o& gmW
hr gmW virtual function Ed§ abstract class H$s ^y{‘H$m H$mo
~VmBE&

IT-304-CBGS PTO

https://www.rgpvonline.com
https://www.rgpvonline.com

[6]

8. a) What are the various stream classes and stream error?


Explain them in brief. What are input and output streams?
Give examples.
{d{^Þ àH$ma Ho$ stream classes Ed§ stream error ³¶m hmoVo h¡?
g§jno ‘| BZH$s ì¶m»¶m H$s{O¶o& Input Ed§ output stream ³¶m h¢?
CXmhaU X|&
b) Explain in detail about exception and how they handled?
Define function template and class template.
{dñV¥V ê$n go exceptions Ho$ ~mao ‘| ì¶m»¶m H$s{O¶o Ed§ Bgo H¡$go
g§^mbm OmVm h¡? Function template VWm class template H$mo
n[a^m{fV H$s{O¶o&

******

IT-304-CBGS PTO

https://www.rgpvonline.com

You might also like