Get premium membership and access revision papers, questions with answers as well as video lessons.

Diploma In Ict: Object Oriented Programming Question Paper

Diploma In Ict: Object Oriented Programming 

Course:Diploma In Information Communication Technology

Institution: Masai Technical Training Institute question papers

Exam Year:2017



MASAI TECHNCAL
OBJECT ORIENTED PROGRAMMING
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.

1 (a) State the important features of object oriented programming.
Compare object oriented programming with procedure oriented programming.(10 marks)
Object oriented programming is a programming language based on the concept of objects in which objects make up classes while procedure oriented
programming is a programming language based on the concept of procedure call in which statements are structured using procedures
1 (b) Define function overloading.
Is a programming concept that allow programmers to define more than one function within the same scope
Write a C++ program to define three overloaded functions to swap two integers, swap two floats and swap two doubles.(10 marks)
2 (a) Differentiate between class and structure.
A class is a collection of related data and functions under a single name
With an example explain the syntax for defining a class.(10 marks)
2 (b) List the characteristics of a constructor.
? They do not have return type
? They have the same name as the class they belong
? They cannot be virtual
? They cannot be inherited
Write a C++ program to define a suitable parameterized constructor with default values for the class distance with data members feet and inches.(10 marks)
3 (a) Differentiate between function overloading and function templates, can we overload a fuction template? Illustrate with an example.(8 marks)
3 (b) Write a C++ program to create a class called STRING and Implement the following operations. Display the result after every operation by overloading the operator <<.
i) STRING S1= 'VTU'
ii) STRING S2 = 'BELGAUM'
iii) STRING S3 = S1+S2 (Use copy constructor).(8 marks)
3 (c) List the characteristics of a friend function.(4 marks)
4 (a) Explain the visibility of base class members for the access specifiers: private, protected and public while creating the derived class and also explain the syntax for creating derived class.(8 marks)
4 (b) Write a C++ program to illustrate multiple inheritance.(6 marks)
4 (c) List the types of inheritances
1. Single –one derived class inherits from a single base class
2. Multiple- a single derived class inherits from a multiple base class
3. Multilevel-a single class inherits from one class which in turn inherits from another class
4. Hierarchical- multiple derived class inherits from a single base class
5. Hybrid-is combination of multilevel and hierarchical inheritance

. Write a C++ program to implement single inheritance with public access specific.(6 marks)
5 (a) With an example, explain the syntax for passing arguments to base class constructors in multiple inheritance.(10 marks)
5 (b) With an example, explain the order of invocation of constructors and destructors in multiple inheritance.(10 marks)
6 (a) Differentiate between early binding and late binding,
Early binding(static)-is the process of linking a procedure call to the execution code in response to runtime
Late binding(dynamic)-is the process of linking a procedure call to the execution code in response to compile time
with an example explain how late binding can be achieved in C++.(8 marks)
6 (b) With an example, explain how virtual functions are hierachical.(6 marks)
6 (c) Define pure virtual functions. Write a C++ program to illustrate pure virtual functions.(6 marks)
7 (a) Explain the output manipulators: setw(), setprecision() and setfill().(6 marks)
7 (b) Explain the use of ifstream and ofstream classes for file input and output.(8 marks)
7 (c) Explain the file operation functions in C++ to manipulate the position of file pointers in a random access file.(6 marks)
8 (a) Define exception handling. Explain the use of try, catch and throw for exception handling in C++.(8 marks)
8 (b) Write a C++ program to illustrate catching all exceptions.(6 marks)
8 (c) Explain briefly the three foundational items of standard template library.(6 marks)






More Question Papers


Popular Exams



Return to Question Papers