How To Exam?

a knowledge trading engine...


Anna University Chennai 2007 B.Sc Computer Science OBJECT ORIENTED PROGRAMMING AND C - Question Paper

Friday, 01 March 2013 02:25Web

2007 Anna University B.Sc Computer Science Object Oriented Programming and C++ ques. paper

Computer Technology

OBJECT ORIENTED PROGRAMMING AND C++

(Common to B.Sc. info Technology)

PART A – (10 X two = 20 marks)


1. describe Object Oriented Programming.
2. What is typecasting ? elaborate explicit and implicit kind conversions?
3. Compare objects and classes.
4. Can a overloaded function be default argumented?
5. What is the limitation of unary operator overloading? How it is solved?
6. Can a constructor be private? Is so what it means, how to use it as a private?
7. C++ require that when a desired class object is created a base class constructor if 1 exists be invoked. Why it is so?
8. Why it does not make a sense for a virtual method to be static?
9. What is the role of isostream.h and iomanip.h header files?
10. Differentiate binary and ASCII file.


PART B ( five X 16 = 80 marks)


11. (i) discuss the feature of OOP. (8)
(ii) Write a C++ program to obtain the sum of the digits of a provided number (8)

12. (a1) What is a qualifier ? discuss different qualifiers used in C++ (8)

(a2) elaborate strings? Are they standard or derived data types? Write an
interactive program to check whether a provided string is a palindrome or not?
What happen if the end of string is missing? (8)
(or)

(b) elaborate command line arguments? discuss with an example. (6)

13. (a1) Write a program to keep track of number of instances created, alive and
destroyed using members, constructor and destructors. (6)

(a2) What is nested class? How does it differ from local class? Create a date as
a nested class of learner qualifier class and do the manipulation of studying
and printing the date of birth and date of joining, of a learner. (10)




(b) Write a program called vector with 1 indirection pointer as its data member.
Overload the operators.

( ) – set the value of the object
[ ] – get the value of individual element
New – to allocate memory location
Delete – to deallocate the memory location

14. (a) Design 3 class student, examination and results, where outcome in inherited from
examination and examination is inherited from learner. Write possible constructors to
initialize the values. Write a main function to test the constructor execution by
creating objects. (16)

Or

(b) Can a constructir be virtual ? What is the use of virtual constructor? How
dynamic binding is achieved in the subsequent program ?

Class X {
Int x;
Public :
Void learn ();
};

Public:

Virtual void learn ( ) ;
Void print ( ) ;
};
Class Z {

Int b ;

Public :

Virtual void learn ( );
Virtual void print ( );
(16)
};

15. (a1) Create a class classed item with necessary data member and member
functions. Write a custom manipulator to print $ before the rate of an item.

(a2) discuss the iostream class hierarchy along with its member.

Or
(b1) discuss about the file opening modes and fault handling functions (8)

(b2) Write a program to create a file called emp.dat with employee number, name,
BP, deductions and allowances as record fields. Open a file learn the record
compute the salary and write it back to the identical file. (8)





( 0 Votes )

Add comment


Security code
Refresh

Earning:   Approval pending.
You are here: PAPER Anna University Chennai 2007 B.Sc Computer Science OBJECT ORIENTED PROGRAMMING AND C - Question Paper