GOVERNMENT ENGINEERING COLLEGE, PATAN
COMPUTER & SCIENCE DEPARTMENT
OBJECT
ORIENTED PROGRAMMING WITH C++ (2140705)
A. Write the following programs in C
language.
1.
Write
a program to find area of a circle.
2. Write a program to swap two numbers
using third variable.
3. Write a program to swap two numbers
without using third variables.
B.
Write
the following programs in C++ language.
1.
To find highest of three numbers using if loop.
2.
Write a program to display prime property of a given number.
3.
Write
a program to enter two nxn matrices and display their sum as third matrix.
C.
Write
the following programs using FUNCTION in C++ language.
1.
Write
a program to find sum of three numbers using functions.
2.
To
find factorial of given number using function.
3.
Write
a recursive function to determine the sum of the integers 1, 2, 3..………+n that
is recursively compute.
D.
Write
the following programs using CONSTRUCTOR & DESTRUCTOR in C++ language.
1.
To enter two operands using constructor and perform arithmetic
operations (+,-,*, /) on them and display the results.
2.
Write
a program to generate a Fibonacci series using copy constructor. The range of
the series should be user defined.
3.
To find largest number from given three numbers using friend
function.
4.
Write
a program to find the sum of two numbers and display it using a friend function
to a class.
E.
Write
the following programs using OPERATOR OVERLOADING in C++ language.
1. Write a program to enter two integers,
two float number, two double numbers and find and display the greater of them
using function overloading technique.
2. Write a program that uses area ()
function for calculation area of triangle or a rectangle or a square using
function overloading technique (without the use of classes).
3. Write a program to demonstrate the
operation of operator overloading function.
F.
Write
the following programs using INHERITANCE in C++ language.
1.
To enter and display the student data using single inheritance
technique.
2.
Write a program to enter the information of an employee and then
display it using the single inheritance concept (one base class and one derived
class).
3.
Write
a program to enter the information of n number of student and then display it
using the multilevel inheritance concept.
G.
Write
the following programs using POLYMORPHISM & VIRTUAL FUNCTION in C++ language.
1.
Write
a program to enter information of a student and display it by using the static
binding technique.
2. Write a program to enter personal and
academic information and demonstrate the operation of virtual function using
late binding technique.
3. Write a program to enter information of
students and demonstrate the concept of polymorphism applied to the member
functions.