Q1:Define a class ABC. Derive two classes BBC and KBC from ABC. All the classes contains same member function name as display(). The base class pointer always holds the derived class objects.
a) Write a program such that base class pointer or reference will always access/call the base version of the members available in derived class, do not have any access to the derived class members.
b) Write a program such that base class pointer or reference will always access/call the derived version of the members available in derived class, do not have any access to the base class members.
Write down the concepts used for bit a) and b) separately.
make a program that will compute and display the total amount of a purchased product
WAP to show rethrowing concept in oop by using suitable.
WAP to show multiple throw statement execution by using suitable example.
WAP to show exception using try throw and catch block.
WAP to show the working of abstract class by considering suitable example.
WAP to show the working of abstract class by considering suitable example
(Pure Virtual Function) Write the above program by modifying by making display() as pure virtual
function.
Q1:Define a class ABC. Derive two classes BBC and KBC from ABC. All the classes contains same
member function name as display(). The base class pointer always holds the derived class objects.
a) Write a program such that base class pointer or reference will always access/call the base version
of the members available in derived class, do not have any access to the derived class members.
b) Write a program such that base class pointer or reference will always access/call the derived
version of the members available in derived class, do not have any access to the base class
members.
Define a class ABC. Derive two classes BBC and KBC from ABC. All the classes contains same member function name as display(). The base class pointer always holds the derived class objects.