Question Paper: Object Oriented Programming with C++ : Question Paper Dec 2014 - Computer Engineering (Semester 4) | Gujarat Technological University (GTU)
0

Object Oriented Programming with C++ - Dec 2014

Computer Engineering (Semester 4)

TOTAL MARKS: 100
TOTAL TIME: 3 HOURS
(1) Question 1 is compulsory.
(2) Attempt any four from the remaining questions.
(3) Assume data wherever required.
(4) Figures to the right indicate full marks.
1 (a) Explain various forms of inheritance with suitable diagrams.(7 marks) 1 (b) What is a constructor? Explain different types of constructors with examples.(7 marks) 2 (a) Explain basic concepts of Object-Oriented Programming.(7 marks) 2 (b) Describe various operators in C++.(7 marks) 3 (a) Explain inline function and its use with suitable example.(7 marks) 3 (b) Explain friend function with suitable example(7 marks) 3 (c) Explain function overloading with suitable example.(7 marks) 3 (d) Explain Static Data Member and Static Member Function with their special characteristics. Also write a suitable programming example.(7 marks) 4 (a) Explain pointer to objects. What is this pointer? Write a program to illustrate the use of this pointer.(7 marks) 4 (b) What is a stream? Describe various stream classes for console I/O operations.(7 marks) 4 (c) Explain STL with its core components.(7 marks) 4 (d) What is Exception? Explain Exception Handling Mechanism. Give example with multiple catch blocks.(7 marks) 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 marks) 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 marks) 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 marks) 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 marks)

Please log in to add an answer.