Assignment 3 OOPS
Assignment 3 OOPS
Assignment 3 OOPS
What is an abstract data type? Can we declare a class as an abstract class? Distinguish between single and multiple inheritances? What are the characteristics of a constructor? What are the implications of private, protected and public visibility mode? What are the advantages of reference variable in parameter passing? Illustrate the purpose of virtual in C++. Is it sometimes useful to specify a class from which no object will be created?
Section B (4 Marks Each) 1. Explain the concept of friend function? 2. Explain the concept of friend class? 3. What do you mean by polymorphism? Explain two types of polymorphisms possible in C++. 4. Briefly explain the difference between static binding and dynamic binding with example of program code? 5. What is the difference between library function and user defined function? 6. How the structure in C differs from C++? 7. Explain the inline function, constructor and destructor? 8. How are pre-increment and pos- increment taken care while declaring the operator overloading? 9. What is the use of reference variables? Section C (8 Marks Each) 1. Explain difference between inheritance and polymorphism in detail showing working example? 2. WAP in C++ to overload operator to add any integer value to a data object? 3. What are the various types of function used in class? What do you mean by classes within classes? 4. What is function overloading? Explain concept of constructor overloading. 5. Explain Overloading ambiguity? 6. What are virtual functions and pure virtual function? Where are they used? Explain. 7. What is container class? In what way container class is different from an inherited class?