Develop pseudocode of following operations for Doubly Circular Linked List.
i) Insertion of a node at beginning.
ii) Insertion of a node at end.
iii) Deletion of first node.
iv) Deletion of last node.
Let a linked list consists of n number of nodes, where each node consists of a unique
number, a priority number (in between 1 to 5), and pointer to next node. Design the
algorithm/develop pseudocode to divide the nodes into different linked list where
each linked consists of nodes having same priority.
Write a program to find out greatest among three numbers. Define two classes, first class KBC contain two data members a and b, and second class BBC only one data member c. Input data to the data members by defining appropriate member functions. A member function max() defined in second class BBC to find out the greatest among three numbers. Solve this problem by using friend function.
Write a program to find out the area of an rectangle be defining a class named as Rectangle having length and breadth as its data members. Declare another class named as Rectangle Area having one member function named as area to calculate the area by taking the data length and breadth from the Rectangle class. Solve this by using friend class.
Write a program to exchange values(swap) between two classes by using friend function(call by reference).
Write a program by using friend function to add data objects of two different classes ABC and XYZ.
Create two classes named Mammals and MarineAnimals. Create another class named BlueWhale which inherits both the above classes. Now, create a function in each of these classes which prints "I am mammal", "I am a marine animal" and "I belong to both the categories: Mammals as well as Marine Animals" respectively. Now, create an object for each of the above class and try calling
1. function of Mammals by the object of Mammal
2. function of MarineAnimal by the object of MarineAnimal
3. function of BlueWhale by the object of BlueWhale
4. function of each of its parent by the object of BlueWhale