B.Tech., III Semester
Examination, December 2023
Grading System (GS)
Max Marks:
70 | Time: 3 Hours
Note:
i) Attempt any five questions.
ii) All questions carry equal marks.
a) What do you understand by object-oriented programming? What are the advantages of programming using object oriented? Explain and define various OOP concepts in brief. (Unit 1)
b) Explain the concept of encapsulation and data abstraction in detail. Write a C++ program to show these concepts in object-oriented programming methodology. Define scope and life of any variable. (Unit 1)
a) Write a C++ program involving the handling of exceptions in constructors and destructors. Explain with an example. (Unit 5)
b) What are the access modifiers? How many types of access modifiers are available in C++. Explain each one in detail and their role in implementing the data hiding in object-oriented programming. (Unit 2)
a) Explain the role of constructor and destructor in a class. What are the different types of constructors in C++? Discuss the copy constructor and parameterized constructor with appropriate example and syntax. (Unit 2)
b) Explain the fundamental concept behind inheritance in object-oriented programming by taking an example. Define multiple, multilevel and hybrid inheritance with example and syntax. (Unit 3)
a) Explain the concept of association and aggregation in object-oriented approach. What is an Abstract class? Why Abstract classes are used? (Unit 2)
b) Discuss Polymorphism in detail. What are the different ways to implement Polymorphism in C++; discuss them in brief. Give differences between function overloading and function overriding (or method overriding) by writing an example and its syntax. (Unit 2)
a) Write a C++ program to calculate the area of rectangle, square and circle using constructor overloading that accepts input from the user and then shows the desired result. (Unit 2)
b) Write a C++ program demonstrating use of the pure virtual function with the use of base and derived classes. (Unit 4)
a) Explain the concept of multithreading in object-oriented programming approach with a suitable example? Discuss its benefits and drawbacks. (Unit 5)
b) Write short notes on following concepts with a suitable example:
i) Virtual function (Unit 4)
ii) Operator overloading (Unit 3)
a) What do you mean by the term class and object? What is the relation and difference between these two? Create a class with the following data members?
Name of the class: student, Data members: name, roll number, branch, year, and college name, Member functions: put_details() and get_details() to set and display student details respectively? (Unit 2)
b) Write short notes on following concepts with a suitable example:
i) Overriding (Unit 4)
ii) Inline function (Unit 1)
a) What is operator overloading? Write a distance class with data members feet and inches. Overload the + operator to add two distance objects. (Unit 3)
b) What is file handling? Write a C++ program to copy the content of one file to another file. (Unit 5)