This document contains details of an Object Oriented Programming lab for a student named Bhavya Chopra. It lists 10 experiments to be performed related to OOP concepts like classes, functions, templates, operator overloading, inheritance, exceptions etc. The experiments involve programs for complex number operations, matrices, finding greatest of 3 numbers, factorials, area and perimeter of a triangle, string operations, file handling, stacks, queues and exception handling. It provides details of the experiment name, dates of performance and checking, and space for remarks and marks.
This document contains details of an Object Oriented Programming lab for a student named Bhavya Chopra. It lists 10 experiments to be performed related to OOP concepts like classes, functions, templates, operator overloading, inheritance, exceptions etc. The experiments involve programs for complex number operations, matrices, finding greatest of 3 numbers, factorials, area and perimeter of a triangle, string operations, file handling, stacks, queues and exception handling. It provides details of the experiment name, dates of performance and checking, and space for remarks and marks.
This document contains details of an Object Oriented Programming lab for a student named Bhavya Chopra. It lists 10 experiments to be performed related to OOP concepts like classes, functions, templates, operator overloading, inheritance, exceptions etc. The experiments involve programs for complex number operations, matrices, finding greatest of 3 numbers, factorials, area and perimeter of a triangle, string operations, file handling, stacks, queues and exception handling. It provides details of the experiment name, dates of performance and checking, and space for remarks and marks.
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
Python Advanced Programming: The Guide to Learn Python Programming. Reference with Exercises and Samples About Dynamical Programming, Multithreading, Multiprocessing, Debugging, Testing and More