Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Object Oriented

Programming Lab
ETCS – 258

Faculty Name: Ms. Arushi Jain


Student Name: Bhavya chopra
Roll No.: 03214803120
Semester: 4
Group: I-2

Maharaja Agrasen Institute of Technology, PSP


Area, Sector – 22, Rohini, New Delhi – 110085
Index
Object Oriented Programming Lab

Practical Details

Exp Experiment Name Date of Date of Remarks Marks


No. Performan checkin
ce g
1(a). Write a program to add and
subtract two complex
numbers
1(b). Write a program to add and
subtract two matrices
2. Using a class write a program
to find out square of given
numbers of different
datatypes
3. Using class write a program to
find greatest of three numbers
4. Write a program to find the
factorial of a number using
class and functions declared
outside the class
5. Write a program to print the
area and perimeter of a
triangle having sides 3,4,5
units by creating a class name
triangle with a function to
print area and perimeter
6. To implement a class string
containing the following
functions: overload plus
operator to carry out
concatenation of string,
overload equal operator to
carry out string copy function
to display length of string,
function “to lower” to convert
uppercase to lower case and
function “to upper” to convert
lower case to uppercase

7. Write a C++ program to read


class student info such as
name, age, gender and height
and to store them on a
specified file using read and
write function. Again the
same file is opened for
reading and displaying the
contents of the file on the
screen
8. Create a class list with
function store and retrieve to
store a value called store
function and to retrieve a
value called retrieve function.
Derive two classes stack and
queue from it and overwrite
store and retrieve
9. Write a program to
demonstrate the use of
special functions, constructor
and destructor in the class
template. The program is used
to find the bigger of two
entered numbers
10. Write a program to raise an
exception if any attempt is
made to refer to an element
whose index is beyond the
array size

You might also like