List of Practicals
1. Write a program for multiplication of two matrices using OOP.
2. Write a program to perform addition of two complex numbers using constructor overloading. The first constructor which takes no argument is used to create objects which are not initialized, second which takes one argument is used to initialize real and imag parts to equal values and third which takes two argument is used to initialized real and imag to two different values.
3. Write a program to find the greatest of two given numbers in two different classes using friend function.
4. Implement a class string containing the following functions:
- a. Overload + operator to carry out the concatenation of strings.
- b. Overload = operator to carry out string copy.
- c. Overload <= operator to carry out the comparison of strings.
- d. Function to display the length of a string.
- e. Function tolower( ) to convert upper case letters to lower case.
- f. Function toupper( ) to convert lower case letters to upper case.
5. Create a class called LIST with two pure virtual function store() and retrieve().To store a value call store and to retrieve call retrieve function. Derive two classes stack and queue from it and override store and retrieve.
6. Write a program to define the function template for calculating the square of given numbers with different data types.
7. 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.
8. Write a program to perform the deletion of white spaces such as horizontal tab, vertical tab, space ,line feed ,new line and carriage return from a text file and store the contents of the file without the white spaces on another file.
9. Write a program to read the class object of student info such as name , age ,sex ,height and weight from the keyboard and to store them on a specified file using read() and write() functions. Again the same file is opened for reading and displaying the contents of the file on the screen.
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.
No comments:
Post a Comment