Object Oriented Programming
Object Oriented Programming
com
42
Reg. No. :
T3028
42
2.
3.
4.
5.
6.
7.
8.
9.
What are the file stream classes used for creating input and output files?
10.
42
1
1.
www.Vidyarthiplus.com
www.Vidyarthiplus.com
11.
(a)
(i)
(ii)
Write a C++ program that inputs two numbers and outputs the
largest number using class.
(8)
Or
(b)
12.
(a)
42
1
PART B (5 16 = 80 Marks)
(i)
(4)
(ii)
Write a C++ program that can take either two integers or two
floating point numbers and outputs the smallest number using
class, friend functions and function overloading.
(12)
(i)
(ii)
Write a C++ program that takes the (x,y) coordinates of two points
and outputs the distance between them using constructors.
(12)
(4)
(b)
Write a C++ program that takes two values of time (hr, min, sec) and
outputs their sum using constructors and operator overloading.
(16)
(a)
(i)
(ii)
42
13.
Or
(4)
Write a C++ program using class template for finding the scalar
product for int type vector and float type vector.
(12)
Or
(b)
(a)
(4)
(ii)
(i)
(ii)
(4)
14.
(i)
42
Create appropriate base and derived classes. Input the details and
output them.
(12)
Or
www.Vidyarthiplus.com
T 3028
www.Vidyarthiplus.com
15.
(a)
(i)
(ii)
Write a C++ program for calculating the area of rectangle and circle
using run-time polymorphism.
(12)
(i)
(ii)
(4)
(i)
(ii)
Write a C++ program using lists from STL to input 10 numbers and
store them in a list. From this list, create two more lists, one
containing the even numbers, and the other containing the odd
numbers. Output all the three lists.
(12)
(b)
(4)
42
1
(b)
42
42
www.Vidyarthiplus.com
T 3028