Object Oriented Programming in C++PU Spring 2023
a) Does the friend function breach Data hiding? Justify. Write a program = to swap the values of variables of two classes using friend function. b) How is DMA better than SMA? Justify your answer.…
15- a) Does the friend function breach Data hiding? Justify. Write a program = to swap the values of variables of two classes using friend function.
- b) How is DMA better than SMA? Justify your answer. Explain how new = and delete operators are used in DMA.
A worked answer is on its wayMeanwhile, read the Object Oriented Programming in C++ notes for this topic.
Discussion
Loading…
More Object Oriented Programming in C++ questions
a) Explain non linear behaviour of complexity. How is OOP different from POP? Explain with examples. b) What are the different ways of defining member…PU Spring 20237a) Explain non linear behaviour of complexity. How is OOP different from POP? Justify with points. OR Define Responsibility Driven Design. Demonstrate the…PU Spring 202315a) What are the advantages of class over structure? Briefly explain the components of a class with program structure in C++. b) Define constructor with its…PU Spring 202315a) Inheritance enhances reusability. Elaborate this using an example of = multilevel inheritance. b) What is abstract class and pure virtual function? How can…PU Spring 20237a) Define static member. Write a program to illustrate the use of static members and static member function. b) How inheritance increases the reusability of…PU Spring 20237a) What is polymorphism? Explain compile time and runtime polymorphism with suitable examples. b) Explain the concept of user defined to user defined data…PU Spring 202315