list of oops programs
list of oops programs
2. Write a C++ program to find the area and perimeter of a circle and rectangle.
6. Find the length of a string. Compare two strings, Concatenate two strings, Reverse a
string, copy a string to another location.
9. Write a C++ program to overload a function to calculate volume of cube, cylinder and
rectangular box.
10. Write a C++ program to create a function template to swap two numbers.
11. Write a code for swapping of two characters through swap function which shows the
functionality of call by reference?
14. Create a student class to read and display data of five students, which has roll number
and name of student as data member and read and display as member functions.
15. Write a C++ program to manipulate the class account using classes and function. A
user should be able to perform the following functions. a. Deposit money. b.
Withdraw money, c. Calculate the interest d. Check the total balance in his account.
16. Create a distance class to show the addition of two distance objects. Class contains
two data members feet and inch. Create addition class to add two objects of distance
class.
17. Write a C++ program to implement Account class with the data members account
number, A/c holder’s Name and Balance, and member function for following
operations use constructors to initialize data members..
a. To Deposit amount
b. To Withdraw amount
c. To Transfer amount from one A/c to another.
18. Write a C++ program to create a time class. Implement various constructors for time
class. A member function should display the object of time in hour : min : sec format
and a member function to add two objects of time class.
20. Create a date class which has data members day, month, and year. Overload operator
‘++’ to increase date by one and create necessary constructors to initialize members.
21. Write a C++ program to overload ‘+’ and ‘-‘, operators for Complex class i.e. these
operators can be used to add and subtract two objects (complex numbers) of complex
class.
23. Write a C++ program to create a class called STUDENT with data members roll
number, Name and Age. Using inheritance, create the classes UGSTUDENT and
PGSTUDENT having fields as Semester, Fees and Stipend. Enter display the data for
at least 5 students.
Student
Result