0% found this document useful (0 votes)
5 views2 pages

C++ OOP Programming Exercises List

The document outlines a list of programming tasks for a C++ course focused on Object-Oriented Programming (OOPS). It includes creating classes, demonstrating inheritance, operator overloading, and file handling. Each task specifies the creation of different classes and functionalities, such as managing student information, shapes, and books.

Uploaded by

Sumit Verma
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

C++ OOP Programming Exercises List

The document outlines a list of programming tasks for a C++ course focused on Object-Oriented Programming (OOPS). It includes creating classes, demonstrating inheritance, operator overloading, and file handling. Each task specifies the creation of different classes and functionalities, such as managing student information, shapes, and books.

Uploaded by

Sumit Verma
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

C++ Programming List

Subject Code: UMICAT505


Subject Name: OOPS using C++
[Link] Program Name
1. Write a program to define a class `Student`
with data members like `name` and `age`, and
member functions to set and display student
information.
2. Write a program to create a class `Rectangle`
with constructors to initialize length and
breadth and a destructor to display a message
when an object is destroyed.
3. Write a Program to create a base class
`Person` with derived class `Employee`,
demonstrating inheritance with simple
attributes like `name` and `salary`.
4. Write a program to create overloaded
functions named `add` to add integers, floats,
and doubles.
5. Write a program to create two classes
`ClassA` and `ClassB`, using a friend function
to access private data members of both
classes.
6. Write a program to overload the `+` operator
to add two complex numbers using a
`Complex` class.
7, Write a program to create a class `Counter`
with a static data member to count the number
of objects created.

8. Write a program with a base class `Shape`


and derived classes `Circle` and `Rectangle`,
demonstrating polymorphism using a virtual
function `draw()`.

9. Write a program to write and read simple text


data (like student names) to/from a file.
10. Write a program to create an array of `Book`
objects, each with attributes like `title` and
`price`, and display their details.

You might also like