You are on page 1of 2

6. Define a class Candidate in C++ with following : 10 Total No.

of Printed Pages : 4 SEM 2 BCA CT 17

Private members : 2017


 A data member RNo of type long
(May)
A data member Score of type float
COMPUTER APPLICATION
A data member Name of type string
(Object Oriented Programming and Design)
A data member Remarks of type string
Course Code : CT-4-BCA-203
A member function AssignRem() to assign Remarks as per Credit : 4
the Score obtained by candidate. Score range and remarks
are : Total Marks : 80 Time : 3 Hours
Score Remarks
<=50 Selected The figure in the margin indicate full marks for the questions
< 50 Not selected
1. Choose the correct answer : 1×4=4
Public members :
(a) Which of the following means the ability to take many forms?
ENTER() to allow user to enter values for RNo, name,
Score and call function AssignRem()to assign the marks. (i) Inheritance (ii) Polymorphism
DISPLAY() to allow user to view the content of all data (iii) Member function (iv) Encapsulation
members
(b) A function that is called automatically each time an object is
7. Write short note on (any three) : 5×3=15 destroyed is a -
(a) Dynamic Model (i) Constructor (ii) Destructor

(b) Functional Model (iii) Destroyer (iv) Terminator

(c) Grandy Booch approach (c) An object is –


(d) Hybrid design method (i) a category of classes (ii) a name given to a class
(iii) an instance of a class (iv) the same as a class
====O====
(4) Contd .....2
(d) Default access specifies is (f) Find the syntax error(s) if any :
(i) public (ii) private
Class students
(iii) protected (iv) None of the above
{
Int Id=10
2. Answer the following questions : 1×3=3
char Name [20];
(a) What is polymorphism?
Public :
(b) What is copy constructor?
student (){}
(c) What is meant by derived class?
void reg(){cin>>Id; gets (Name);}
void disp () {cout <<Id<< Name;}
3. Differentiate between : 3×3=9
}
(a) Data members and member functions

(b) New operator and delete operator 5. Answer the following questions (any three) : 9×3=27
(c) Compile time and run time polymorphism
(a) What are the advantages of OOP? Compare OOP with
Procedure Oriented Programming.
4. Answer the following questions : 2×6=12
(b) What is inheritance? Describe briefly about different types of
(a) What is friend function?
inheritance with proper diagram.
(b) What is function overloading?
(c) What is static variable? (c) Describe the different phases of object oriented development.

(d) What is virtual base class? (d) Explain the different data types available in C + +.
(e) What is enumeration?
(e) What are loops? Explain different types of loops available in
C++.

Contd .....3 Contd .....4

You might also like