0% found this document useful (0 votes)
29 views1 page

Assignment No.3 OOP

Uploaded by

varunmali8275
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)
29 views1 page

Assignment No.3 OOP

Uploaded by

varunmali8275
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/ 1

GOVERNMENT POLYTECHNIC, Assignment Year:- 2024-25

NANDURBAR
No.3
Dept: COMPUTER ENGINEERING
ACAD/F/ Subject:- OOP(313304) Pages:- 1

Rev=00 Date:-25/10/2024 Topic No:-3 Date of submission :-07/11/2024

Name of Subject Teacher:- MAGAN P. VASAVE Total No of Questions:- 21

1. What is inheritance? Define it.


2. Explain different types of inheritance with example.
3. What are the advantages and disadvantages of declaring inheritance?
4. What is the difference between the base and derived classes?
5. Differentiate between public and private inheritance.
6. What is the scope of the accessibility of variables in the protected section and in the private section of a class?
7. What is visibility mode? What is its role?
8. With the help of example describe effects of visibility modes.
9. How is a single inheritance different from multiple inheritance?
10. Describe the following terms with example:
i) Multiple inheritance.
ii) Base class and Derived class.
11. What is abstract class?
12. Explain the term virtual base class with example.
13. With the help of program explain constructs in derived class.
14. What is hybrid inheritance? Explain with real world example.
15. Explain Multiple Inheritance with suitable example .
16. Diference between Multiple and Multilevel Inheritance.
Programming:
1. Write a program on Single Inheritance
2. Write a program to add two numbers using single inheritance such that the base class function must accept the two
numbers from the user and the derived class function must add these numbers and display the sum.
3. Write a program to calculate percentage of a student using multi level inheritance. The base class function will accept the
marks in three subjects from user. A class will be derived from the above mentioned class that will have a function to find
the total marks obtained and another class derived from this will have functions to calculate and display the percentage
scored.
4. Write a 'C++' program to declare a class COLLEGE with members as college code. Derive a new class as STUDENT with
members as stupid. Accept and display details of student along with college for one object of student.
5. 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

You might also like