CS 2311 OBJECT ORIENTED PROGRAMMING NOV/DEC 2010 Question paper EEE fifth semester
, by questionbank2u
B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER 2010
Fifth Semester
Electrical and Electronics Engineering
CS 2311 — OBJECT ORIENTED PROGRAMMING
(Common to Instrumentation and Control Engineering and Electronics and
Instrumentation Engineering)
(Regulation 2008)
Time : Three hours Maximum : 100 Marks
Answer ALL questions
PART A — (10 × 2 = 20 Marks)
1. With respect to C++ distinguish 'objects' from 'classes'.2. Write a copy constructor for class date (assume mm, dd, yy as its members).
3. What is encapsulation? Do friend functions violate encapsulation?
4. How are virtual functions declared in C++?
5. What are IO streams? Give an example.
6. What is the purpose of the STL (Standard Template Library)?
7. Give two examples for java modifiers.
8. What is the purpose of the getBytes( ) method?
9. Give a sample statement for parseInt( ) and give comments for the statement.
10. What are the two ways of creating java threads?
PART B — (5 × 16 = 80 Marks)
11. (a) Write a C++ program to perform 2D matrix operations as follows:
(i) Define class MATRIX, use appropriate constructor(s). (5)
(ii) Define methods for the following two matrix operations:
determinant and transpose. (6)
(iii) Write a main program to demonstrate the use of the MATRIX class
and its methods. (5)
Or
(b) Explain the features of object oriented programming. Describe how each
of these is implemented in C++ and Java.
0 comments:
Post a Comment