0% found this document useful (0 votes)
1 views

Object-Oriented Programming Using C++ Lab

Uploaded by

Govind 025
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views

Object-Oriented Programming Using C++ Lab

Uploaded by

Govind 025
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Handbook of B.Tech. Programmes offered by USICT at Affiliated Institutions of the University.

Paper Code(s): CIC-257 L P C


Paper: Object-Oriented Programming Using C++ Lab - 2 1

Marking Scheme:
1. Teachers Continuous Evaluation: 40 marks
2. Term end Theory Examinations: 60 marks
Instructions:
1. The course objectives and course outcomes are identical to that of (Object-Oriented Programming Using
C++) as this is the practical component of the corresponding theory paper.
2. The practical list shall be notified by the teacher in the first week of the class commencement under
intimation to the office of the Head of Department / Institution in which the paper is being offered from the
list of practicals below. Atleast 10 experiments must be performed by the students, they may be asked to
do more. Atleast 5 experiments must be from the given list.

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.

Applicable from Batch Admitted in Academic Session 2021-22 Onwards Page 336 of 427

You might also like