B.TECH - Semester 4 object oriented techniques Question Paper 2019 (jun)
Practice authentic previous year university questions for better exam preparation.
Sample Questions
- Differentiate between procedure oriented and object oriented programming.
- What is operator overloading? Which all operators cannot be overloaded in $\mathrm{C}++$ ?
- In control structure switch-case what is the purpose of default statement? What is the effect of absence of break in switch case in C++?
- What is the significance of "this" pointer in $\mathrm{C}++$ ? .
- How is an exception handled in $\mathrm{C}++$ ? Answer one questions from each Module. Each question carries 20 marks.
- (a) State the difference between class and struct and illustrate with an example. 8
- (b) Explain object oriented system design process.
- What are in-line functions? Explain advantages of using in-line functions. Mention situations wherein-line functions cannot be used.
- (a) What are friend functions? Illustrate with an example.
- (b) Write a program to perform addition of time in hour-minute-second format. Use objects as function arguments.
- Create a class vector to hold an array of integers and perform the following operations using constructor for dynamic allocation of array based on size given as argument. (a) Create two vectors using constructor.
- Create a class vector to hold an array of integers and perform the following operations using constructor for dynamic allocation of array based on size given as argument. (b) Add the vectors and return the resultant vector.
- Create a class vector to hold an array of integers and perform the following operations using constructor for dynamic allocation of array based on size given as argument. (c) Multiply all elements in the vector by a given number $X$ and display the r...
- (a) With a sample $\mathrm{C}++$ program explain overloading of unary operators.
- (b) Write a C++ program to illustrate the concept of polymorphism by creating derived classes that define their own operation in virtual functions. A base class contains a pure virtual function but the actual function definitions are contained in the...
- With sample C++ program, explain the various types of inheritance.
- Define a function template giving its syntax. Write a $\mathrm{C}++$ program to implement array representation of a stack for integers, characters and floating point numbers using class template.
- (a) Describe the various classes available for file operations.
- (b) Write a C++ file program to store the details of 10 employees in a file called emp.dat. Read the contents of the file and generate a pay roll for employees.
- 404 : OBJECT ORIENTED TECHNIQUES (R F) Time : 3 Hours Max. Marks : 100 PART - A Answer all questions. Each questions carries 4 marks.
- List the special features of object oriented programming.
- What is scope resolution operator?
- What is a reference variable? What are its uses?
- Write any four special properties of constructor.
- Write some situations where inline expansion may not work.
- Discuss static members with an example.
- List out the operators that cannot be overloaded using friend function.
- What is a pure virtual function?
- Write a short note on Microsoft foundation classes.
- How do you represent classes and attributes using UML? ( $10 \times 4=40$ Marks) P.T.O. Answer any one full questions from each Module. Each full question carries 20 marks.
- (a) Compare the use of reference and pointers in various contexts.
- (b) Write a short note on default function arguments.
- (a) Explain the design of an object oriented system.
- (b) Illustrate the various function call mechanisms with suitable examples.
- (a) With suitable example explain private member functions.
- (b) Explain about copy constructor with an example.
- (a) Illustrate with example how to define a member function outside the class definition.
- (b) Explain dynamic memory allocation with example.
- (a) Discuss the difference between virtual function and pure virtual function.
- (b) Explain operator overloading with suitable examples. OR
- (a) Define polymorphism. Explain the different types of polymorphism.
- (b) Explain multiple inheritance with an example. ( $\mathbf{3} \boldsymbol{\times} \mathbf{2 0} \boldsymbol{=} \mathbf{6 0}$ Marks)