OOP Assignment
OOP Assignment
UNIT -1
1. Write the applications and Advantages of OOP
2. Difference between OOP and POP
3. Compare C and C++
4. Describe the use of scope resolution operator with example program
5. Describe type casting, types of type casting with suitable examples
6. Describe the memory management operators and manipulators with examples
7. Explain the basic input/output operators with examples
8. Explain the structure of C++ program
9. Explain the Access specifiers in C++
10. Write a C++ program to find whether the entered number is even or odd Write a program to find whether
a string is palindrome or no
12. Develop a program to declare a class student, the data members are rollno, name and marks. Accept and
display data for one object of class student.
UNIT -2
1. Explain Inline function with example program
2. Explain friend function with example program
3. Define constructor and explain types of constructors
4. Difference between constructors and destructors
5. Write a C++ program to find Average of two numbers using friend function.
6. Write a C++ program to create a class "Number" having data members n1 and n2 and perform
mathematical operations like addition, subtraction, multiplication and division on two numbers using inline
functions
7. WAP to implement default constructor that initializes num1 and num2 as 10 and 20 and prints the values of
num1 and num2
8. Write a C++ program to declare a class student with members as roll no, name and department. Declare a
parameterized constructor with default value for department as 'CO' to initialize members of object.
Initialize and display data for two students.
10. Write a C++ program to declare class ‘Account’ having data members as Account_No and Balance. Accept
this data for 10 accounts and display data of Accounts having balance greater than 1000.
UNIT - 3
1. Explain inheritance and types of inheritance with diagram
2. What is visibility modes, Explain.
3. Explain the concept of Virtual base class with example program
4. Develop a C++ program for multilevel inheritance
5. Explain Abstract class
6. Write a C++ program to define a class "Employee" having data members emp_no,
emp_name and emp_designation. Derive a class "Salary" from "Employee" having
data members basic, hra, da, gross_sal. Accept and display data for one employee.
7. Write a C++ program to implement the following inheritance. Accept and display
data for one programmer and one manager.
8. Write a C++ program to implement the concept of virtual base class for following figure.
10. WAP to implement inheritance shown below figure. Assume suitable member function.
UNIT - 4
UNIT -5
1. Describe the file modes
2. Explain the file stream classes
3. Explain the function used to read and write data in binary file.
4. Write a C++ program to write “Welcome to poly” in a file .Then read the data From file and display it on
screen.
5. Write a program for reading and writing data in a file.
6. Explain File handling operations
7. Develop a C++ program to read content of file "abc.txt"
8. Write a program to count number of lines in a file
9. Write a program to copy the data from one file to another file
10. Write the Difference between Sequential access and Random access file