Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
14 views

Be Computer Engineering Semester 3 2022 November Object Oriented Programming Oop Pattern 2019

The document appears to be part of an exam for a course on object oriented programming in C++. It contains instructions for the exam and 6 questions with 3 sub-questions each. The questions cover topics like polymorphism, operator overloading, pure virtual functions, runtime polymorphism, function overloading, abstract classes, file handling, command line arguments, exceptions, templates, and generic programming in C++.

Uploaded by

avni Ayesha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Be Computer Engineering Semester 3 2022 November Object Oriented Programming Oop Pattern 2019

The document appears to be part of an exam for a course on object oriented programming in C++. It contains instructions for the exam and 6 questions with 3 sub-questions each. The questions cover topics like polymorphism, operator overloading, pure virtual functions, runtime polymorphism, function overloading, abstract classes, file handling, command line arguments, exceptions, templates, and generic programming in C++.

Uploaded by

avni Ayesha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Total No. of Questions : 8] SEAT No.

8
23
PA-1235 [Total No. of Pages : 3

ic-
[5925]-257

tat
6s
S.E. (Computer/Artificial Intelligence & Data Science/

9:0
02 91
Computer Science & Design Engineering)

3:1
0
OBJECT ORIENTED PROGRAMMING

31
7/0 13
(2019 Pattern) (Semester - III) (210243)
0
2/2
.23 GP

Time : 2½ Hours] [Max. Marks : 70


E
80

8
Instructions to the candidates:
C

23
1) Attempt Q1 or Q2, Q3 or Q4, Q5 or Q6, Q7or Q8.

ic-
16

2) Figures to the right indicate full marks.

tat
8.2

6s
3) Neat diagrams must be drawn wherever necessary.
.24

9:0
4) Assume suitable data, if necessary.
91
49

3:1
30
31

Q1) a) Explain the polymorphism feature of OOP. What are the different ways
01

to achieve polymorphism in C++ Language? Explain them along with


02

examples.
2/2

[5]
GP

b) What is operator overloading? Write a program to overload '+' operator


7/0

for adding two complex numbers which are object of below complex
CE
80

8
23
class. [6]
.23

Class Complex ic-


16

tat
{
8.2

6s

Private: int real, imag;


.24

9:0
91
49

};
3:1
30

c) What is Pure virtual function? Illustrate the use of Pure virtual function.
31
01

[6]
02
2/2

OR
GP
7/0

Q2) a) What is runtime polymorphism? How it is achieved in C++. Explain it


CE

along with example.


80

[5]
b) What is function overloading? Write defination of three overloaded
.23

functions (add) which will add two integer, float and double numbers
16

respectively. [6]
8.2

c) Explain abstract class concept along with example. [6]


.24
49

P.T.O.
Q3) a) What are various functions used to manipulate file pointers? Explain

8
using example.

23
[7]

ic-
b) What are command line arguments in C++? Write a program to explain

tat
the same. [7]

6s
9:0
c) What are fstream, ifstream and ofstream? Illustrate with help of example.

02 91
3:1
[4]

0
31
7/0 13 OR
0
2/2
Q4) a) Write a program to create file, read and write record into it. Every
.23 GP

record contains employee name, id and salary. Store and retrieve atleast
E

3 data.
80

[7]

8
C

23
b) What do you mean by file handling? Explain the following functions.

ic-
16

tat
[7]
8.2

6s
i) open()
.24

9:0
91
49

3:1
ii) get()
30
31

iii) getline()
01
02
2/2
GP

c) Write a program to create files using constructor function. [4]


7/0
CE
80

8
23
.23

Q5) a) Distinguish between overloaded function and function template with


ic-
16

suitable example. [4]


tat
8.2

6s

b) What is an exception specification? Explain using suitable example.


.24

9:0
91

[6]
49

3:1
30

c) What is generic programming? How it is implemented in C++.


31

[7]
01
02

OR
2/2
GP

Q6) a) Write short note on type name and export key-word.


7/0

[4]
CE
80

b) Explain class template using multiple parameters with help of program.


.23

[6]
16

c) Explain exception handling mechanism in C++? Explain by program


8.2

to handle "divide by zero". [7]


.24
49

[5925]-257 2
Q7) a) What is purpose of iterator and algorithm. [4]

8
23
b) What is STL? List and explain different types of STL containers. [6]

ic-
tat
c) Write a program to implement map in STL. [8]

6s
OR

9:0
02 91
3:1
Q8) a) What are major components of STL. [4]

0
31
b) 7/0 13
State functions of vector STL. Write a program to explain the same.
0
2/2 [6]
.23 GP

c) What is container? List the container classes in C++. Explain any one
of them using program.
E

[8]
80

8
C

23
ic-
16

tat

8.2

6s
.24

9:0
91
49

3:1
30
31
01
02
2/2
GP
7/0
CE
80

8
23
.23

ic-
16

tat
8.2

6s
.24

9:0
91
49

3:1
30
31
01
02
2/2
GP
7/0
CE
80
.23
16
8.2
.24
49

[5925]-257 3

You might also like