GTU Computer Engineering (Semester 4)
Object Oriented Programming with C++
December 2014
Total marks: --
Total time: --
INSTRUCTIONS
(1) Assume appropriate data and state your reasons
(2) Marks are given to the right of every question
(3) Draw neat diagrams wherever necessary


1 (a) Explain various forms of inheritance with suitable diagrams.
7 M
1 (b) What is a constructor? Explain different types of constructors with examples.
7 M

2 (a) Explain basic concepts of Object-Oriented Programming.
7 M
2 (b) Describe various operators in C++.
7 M

3 (a) Explain inline function and its use with suitable example.
7 M
3 (b) Explain friend function with suitable example
7 M
3 (c) Explain function overloading with suitable example.
7 M
3 (d) Explain Static Data Member and Static Member Function with their special characteristics. Also write a suitable programming example.
7 M

4 (a) Explain pointer to objects. What is this pointer? Write a program to illustrate the use of this pointer.
7 M
4 (b) What is a stream? Describe various stream classes for console I/O operations.
7 M
4 (c) Explain STL with its core components.
7 M
4 (d) What is Exception? Explain Exception Handling Mechanism. Give example with multiple catch blocks.
7 M

5 (a) Define a class complex with real and imaginary as two data member with default & parameterized constructors, function to initialize and display data of class. It should overload the + operator to add two complex objects. Write a complete C++ program to demonstrate use of complex class.
7 M
5 (b) Create a class student that stores roll_no, name. Create a class test that stores marks obtained in five subjects. Class result derived from student and test contains the total marks and percentage obtained in test. Input and display information of a student.
7 M
5 (c) Create a class ITEM with item_code, item_rate and quantity as data members. Create an array of pointers to objects of class ITEM. Write a member function which will calculate the amount of item. Print item_code and amount of item.
7 M
5 (d) Write a program that reads a text file and creates another text file that is identical except that every letter must be converted to lower case irrespective of its original case (e.g 'a' or 'A' will become 'a').
7 M



More question papers from Object Oriented Programming with C++
SPONSORED ADVERTISEMENTS