Semester : SEMESTER 6
Subject : Object Oriented Programming
Year : 2019
Term : MAY
Scheme : 2015 Full Time
Course Code : EC 312
Page:1
E F1103 Pages: 2
Reg No.:_. Name:
APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY
SIXTH SEMESTER B.TECH DEGREE EXAMINATION(R&S), MAY 2019
Course Code: EC312
Course Name:Object Oriented Programming
Max. Marks: 100 Duration: 3 Hours
Answer any two full questions, each carries 15 marks Marks
1 a) Discuss the features and advantages of Object Oriented Programming. (7)
b) Illustrate with a real life example how multi-level inheritance is implemented in (8)
C++ programs.
2 a) Identify the error in the following C++ program segment. Give explanation. Give (7)
any suggestion to rectify the error.
#include
class room
{
intwidth, length;
void setvalue(int w, 1)
{
width=w; length=1}
];
void main()
{
room classroom;
classroom.setvalue(12,13):
b) What is an object in a C++ program? (4)
c) What is the need of an abstract base class? Give example. (4)
3 ஐ Explain the use of constructors and destructors in a program. Write example to (7)
show different constructors used in same class definition.
b) Write a program to show how to overload ‘+’ operator (8)
i) without friend function
ii) with friend function
PART B
Answer any two full questions, each carries 15 marks
4 a) How 15 polymorphism achieved in C++ at (7)
i) run time
ii) compile time ?
Page 1 of 2