GOVERNMENT ENGINEERING COLLEGE, PATAN
COMPUTER & SCIENCE DEPARTMENT
OBJECT
ORIENTED PROGRAMMING WITH C++
(2140705)
Ø
Write the
following programs in C language.
1.
Write a program
to find area of a circle.
2.
Write a program
for sum of two numbers.
3.
Write a program
to swap two numbers using third variable.
4.
Write a program
to swap two numbers without using third variables.
Ø Write the following programs in CPP
(C++) language.
1.
To
find highest of three numbers using if loop.
2.
Write
a program to convert degree Fahrenheit to Celsius.
3.
Write
a program to display prime property of a given number.
4.
Write a program
to enter two nxn matrices and display their sum as third matrix.
Ø Write the following programs using
FUNCTION in CPP language.
1.
Write a program to
find sum of three numbers using functions.
2. Write a function
big to find largest of two numbers and use this function in the main program to
find largest of three numbers.
3.
To find
factorial of given number using function.
4.
Write a recursive
function to determine the sum of the integers 1, 2, 3..………+n that is
recursively compute.
Ø Write the following programs using
CONSTRUCTOR & DESTRUCTOR in CPP 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 biggest 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.
Ø Write the following programs using
OPERATOR OVERLOADING in CPP 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.
Ø Write the following programs using
INHERITANCE in CPP 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.
Ø Write the following programs using
POLYMORPHISM & VIRTUAL FUNCTION in CPP 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.