Sample Test Paper – I Academic Year:-
9036 Course Name Course code Semester Subject Duration
:- Computer Engineering Group :- CO/CT/IF/CD :- Third :- Object Oriented Programming :- 1 hours
Marks: 20
Instructions: 1] All questions are compulsory. 2] Figures to the right indicates full marks. 3] Use of non-programmable calculator is permissible. Q 1: Attempt any TWO :
(2 x 2 = 4)
a) List characteristics of oop. b) List basic concepts of oop. c) How to define member function outside of class?
Q 2: Attempt any TWO :
(4 x 2 = 8)
a) Write a structure declaration for 5 students having following data members. i.Name. ii.Phone number. b) State characteristics of static data members in a class. c) Define a class result consisting of data members i.Name. ii.Percentage. Write a member function to accept data values for data members.
Q 3 : Attempt any TWO :
(4 x 2 = 8)
a) Define the following terms i.Data abstraction. ii.Encapsulation. b) Write a program to illustrate friend function. 1
c) Write a program to accept data for 5 cars for the given class Class car { private: char name[20]; float price; public: void accept(); }
2
Sample Test Paper – II Academic Year:-
9036 Course Name Course code Semester Subject Duration
:- Computer Engineering Group :- CO/CT/IF/CD :- Third :- Object Oriented Programming :- 1 hours
Marks: 20
Instructions: 1] All questions are compulsory. 2] Figures to the right indicates full marks. 3] Use of non-programmable calculator is permissible. Q 1: Attempt any TWO :
(2 x 2 = 4)
a) Define abstract class. b) List different forms of inheritance. c) How to initialize a pointer? Q 2 Attempt any TWO :
(4 x 2 = 8)
a) When do we use protected visibility specifier? b) Write a code to display a string using pointer to the string. c) Illustrate concept of ‘this’ pointer. Q 3: Attempt any ONE :
(8 x 1 = 8)
a) Write a program to concatenate two strings using pointer to string. b) Write a program to implement the inheritance as shown in figure. Class name: staff Member variable: name
Class name: staff_detail
Class name: staff_info
Member variable: subject qualification
Member variable: address phone no. 3
4