Headlines News :
Home » » CS2203 OBJECT ORIENTED PROGRAMMING ANNA UNIVERSITY QUESTION PAPER NOV/DEC 2010, NOV/DEC 2009 for CSE & IT dpt ...

CS2203 OBJECT ORIENTED PROGRAMMING ANNA UNIVERSITY QUESTION PAPER NOV/DEC 2010, NOV/DEC 2009 for CSE & IT dpt ...

Written By Anonymous on Monday, October 29, 2012 | 10/29/2012

CS2203 OBJECT ORIENTED PROGRAMMING ANNA UNIVERSITY QUESTION PAPER  NOV/DEC 2010, NOV/DEC 2009 for CSE & IT dpt ...

Posted by R.Anirudhan

B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER 2010

Third Semester

Computer Science and Engineering

CS 2203 â€" OBJECT ORIENTED PROGRAMMING

(Common to Information Technology)

(Regulation 2008)

Time : Three hours Maximum : 100 Marks

Answer ALL questions

PART A â€" (10 × 2 = 20 Marks)

1. What is data hiding?
2. What are the advantages of default arguments?
3. Write any four special properties of constructor.
4. List any four operators that cannot be overloaded.
5. What is a template?
6. How is an exception handled in C++?
7. When do we make a class virtual?
8. Distinguish between early binding and late binding.
9. Name the features included in C++ for formatting the output.
10. What is file mode? List any four file modes.

PART B â€" (5 × 16 = 80 Marks)

11. (a) Explain the special features of object oriented programming. (16)
Or
(b) (i) List the special characteristics of friend function. (6)
(ii) Write a C++ program to find the area of the square, rectangle, circle
using function overloading. (10)
12. (a) Explain the different types of constructors with suitable examples. (16)
Or
(b) (i) Write the rules for overloading the operators. (6)
(ii) Write a C++ program to add two complex numbers using operator
overloading. (10)
13. (a) (i) Explain the overloading of template function with suitable example.
(8)
(ii) Write a function template for finding the minimum v alue contained
in an array. (8)
Or
(b) (i) List the advantages of exception handling mechanisms. (4)
(ii) Write a C++ program for the following :
(1) A function to read two double type numbers from keyboard.
(2) A function to calculate the division of these two numbers.
(3) A try block to throw an exception when a wrong type of data is
keyed in.
(4) A try block to detect and throw an exception if the condition
‘‘divide-by-zero’’ occurs.
(5) Appropriate catch block to handle the exceptions thrown. (12)
14. (a) Explain different types of inheritance with suitable example for each one
of them. (16)
Or
(b) (i) Give the rules for writing virtual functions. (6)
(ii) Write a C++ program to illustrate the use of virtual function. (10)
15. (a) (i) Explain the use of any six manipulators with example. (6)
(ii) Discuss in detail the unformatted I/O operations. (10)
Or
(b) (i) Explain the stream classes for file operations with suitable
diagram. (4)
(ii) Write an interactive, menu-driven C++ program that will access the
database file containing the list of telephone numbers and their
corresponding customer name, and implement the following tasks :
(1) Determine the telephone number of the specified person.
(2) Determine the name if the telephone number is known.
(3) Update the telephone number, whenever, there is a change.
(12)

====================================================================

B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER 2009

Third Semester

Computer Science and Engineering

CS 2203 â€" OBJECT ORIENTED PROGRAMMING

(Common to Information Technology)

(Regulation 2008)

Time : Three hours Maximum : 100 Marks

Answer ALL Questions

PART A â€" (10 × 2 = 20 Marks)

1. List any four Object Oriented programming concepts.
2. What is an abstract class?
3. What is a copy constructor?
4. What are the operators that cannot be overloaded?
5. What are templates?
6. Illustrate the exception handling mechanism.
7. What are the visibility modes in inheritance?
8. Write the prototype for a typical pure virtual function.
9. What are the file stream classes used for creating input and output files?
10. List out any four containers supported by Standard Template Library.

PART B â€" (5 × 16 = 80 Marks)

11. (a) (i) Explain the idea of Classes, Data abstraction and encapsulation.
(8)
(ii) Write a C++ program that inputs two numbers and outputs the
largest number using class. (8)
Or
(b) (i) What are the rules to be followed in function overloading. (4)
(ii) Write a C++ program that can take either two integers or two
floating point numbers and outputs the smallest number using
class, friend functions and function overloading. (12)
12. (a) (i) Explain the various types of constructors. (4)
(ii) Write a C++ program that takes the (x,y) coordinates of two points
and outputs the distance between them using constructors. (12)
Or
(b) Write a C++ program that takes two values of time (hr, min, sec) and
outputs their sum using constructors and operator overloading. (16)
13. (a) (i) Write the syntax for member function template. (4)
(ii) Write a C++ program using class template for finding the scalar
product for int type vector and float type vector. (12)
Or
(b) (i) Explain how rethrowing of an exception is done. (4)
(ii) Write a C++ program that illustrates multiple catch statements.
(12)
14. (a) (i) Explain the different forms of inheritance. (4)
(ii) Write a C++ program handling the following details for students
and staff using inher itance.
Student details : name, address, percentage marks.
Staff details : name, address, salary.
Create appropriate base and derived classes. Input the details and
output them. (12)
Or
(b) (i) Explain the need for pure virtual functions. (4)
(ii) Write a C++ program for calculating the area of rectangle and circle
using run-time polymorphism. (12)
15. (a) (i) Explain any two functions used for manipulating file pointers. (4)
(ii) A data file ‘‘DATA’’ contains the name and marks of a set of
students. Write a C++ program that reads the contents of this file
into an object, sorts the data in descending order of mark s and
writes the result to an output file ‘‘OUTPUT’’. (12)
Or
(b) (i) Explain any two sequence containers supported by Standard
Template Library. (4)
(ii) Write a C++ program using lists from STL to input 10 numbers and
store them in a list. From this list, create two more lists, one
containing the even numbers, and the other containing the odd
numbers. Output all the three lists. (12)
Share this article :

0 comments:

Post a Comment

 
Support : Creating Website | Johny Template | Maskolis | Johny Portal | Johny Magazine | Johny News | Johny Demosite
Copyright © 2011. Education World - All Rights Reserved
Template Modify by Creating Website Inspired Wordpress Hack
Proudly powered by Blogger