Ambiguities in multiple inheritances


Q1. Write down a C++ program to write squares and cubes of the natural numbers in a file named ‘Table’.

Q2. List out any 6 guidelines for functions in the C++ to encompass default arguments?

Q3. Describe with illustrations the three ways in which the class can be inherited.

Q4. Describe the methods which are used to resolve the ambiguities in multiple inheritances. Give appropriate illustrations.

Q5. Create a class named 'TIME' which has three integer data members for hours, minutes and seconds. The class must have a constructor to initialize the object to zero and a constructor to initialize the object to certain constant value. The class must have member function to add two TIME objects and member function to display time in HH:MM:SS format. Write down main function to construct two TIME objects, add them and display the outcome in HH:MM:SS format.

Q6. Write down a program to read two matrices and add them. By using operator overloading so that the statement for adding the matrices might be written as Z = X + Y. Where X and Y are matrices.

Q7. Write down the operator function to overload the insertion, extraction operators, increment and decrement operators (both pre-fix and postfix notations).

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Ambiguities in multiple inheritances
Reference No:- TGS010579

Expected delivery within 24 Hours