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

OOP Assignment

Uploaded by

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

OOP Assignment

Uploaded by

sree dhanya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

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

11. Write a C++ program to print multiplication table of 7.

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.

9. Explain static data member with example programs

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.

9. Explain Constructors in Derived Class in C++ using example program.

10. WAP to implement inheritance shown below figure. Assume suitable member function.
UNIT - 4

1. Differentiate compile time and run time polymorphism


2. Define pointer, with examples
3. Describe function overloading with example program
4. State the rules for Virtual function
5. Describe 'this' pointer with example
6. Explain operator overloading with its types
7. Define a class parent in which use read function, define another class child use same read function. Display
the data of both the read function on output screen using virtual function.
8. Write a C++ program declare a class "polygon" having data members width and height. Derive classes
"rectangle" and "triangle" from "polygon" having area() as a member function. Calculate area of triangle and
rectangle using pointer to derived class object.
9. Write a C++ program to overload unary operators (++) increment and (--) decrement
by using member function and friend function.
10. Write a C++ program to add two complex numbers using operator overloading by a friend function.

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

You might also like