Professional Documents
Culture Documents
:
PA1089 |Total No. of Pages :4
|5905|-41
S.Y.B.C.A. (Science)
BCA-241: OBJECT ORIENTED PROGRAMMING AND C++
(2019 Pattern) (Semester- IV)
Time :3 Hours| Max. Marks : 70
Instructions to the candidates:
I) All questions are compulsory.
2) Figures to the right indicate full marks.
3) Draw neat diagram wherever necessary.
PIO.
B) Answer the following. (5x1=5]
a) What is Abstract class?
b) List the different types of constructor.
c) Write the syntax to create a class.
d) List file opening modes.
e) Define Encapsulation.
02) Answer the following. (Any Five) |5x3=15]
a) What is Inline function? Write its syntax and advantages.
b) Write any 3 differences between OOP (Object Oriented Programming)
and POP (Procedure Oriented Programming)
c) Write a program to find area of rectangle using constructor.
What is static data member? List its characteristics.
e) What is Exception? Which Keywords are used? Write its general syntax.
f) Write a program to display factors of a number.
int
public:
void display ( )
2
|5905]-41
class B: public A
int y;
public:
void display ()
cout <<y << endi;
main()
B b;
statement
statement 2
private:
int x;
public:
void set (int x)
{ Test ::x= x;}
void print ()
:
[5905]-41 3
main ()
Test obj;
int x =40;
obj. set (x);
obj. print (0:
# include <iostream.h>
class Basel
public:
Basel ()
class Base 2
public:
Base 2()
cout <<Base 2 constructor is called";
public:
Derived()
cout <<Derived constructor called";
main(
Derived d;
4
[59051-41