Create and Implement a C++ program to overload >, <, == operators for the class Complex
numbers. Take two objects of class and compare both objects. Write a driver program to test
your class.
Create and Implement a C++ program to make a class box. Set values of its data members i.e.
length, width and breadth using constructor. Make member function to display the volume of
box. Use operator overloading to add, subtract, multiply and divide the data members (using
objects in main) length, breadth and width. Show volume of each overloaded operator’s
object. Write a driver program to test your class.
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
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.
(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.
Write down the concepts used for bit a) and b) separately.
WAP using class template with multiple parameters
WAP using function template to add two numbers and display result.