1)Write a C++ program and create an instance of the Base and Derived class. Call all the
methods of the two classes (3 methods for the first class and 4 methods for the second
class) and print the returned values.
Create a pointer of the Base class and initialize it with an address of an instance of the
Derived class and use that pointer to call and print the returned value of the get_info()
method of the Derived class.
2) How to make the get_info() method a pure virtual.
السؤال
حمامه السلام
1)Write a C++ program and create an instance of the Base and Derived class. Call all the
methods of the two classes (3 methods for the first class and 4 methods for the second
class) and print the returned values.
Create a pointer of the Base class and initialize it with an address of an instance of the
Derived class and use that pointer to call and print the returned value of the get_info()
method of the Derived class.
2) How to make the get_info() method a pure virtual.
رابط هذا التعليق
شارك على الشبكات الإجتماعية
5 أجوبة على هذا السؤال
Recommended Posts
انضم إلى النقاش
يمكنك أن تنشر الآن وتسجل لاحقًا. إذا كان لديك حساب، فسجل الدخول الآن لتنشر باسم حسابك.