Q4: Suppose, the same function is defined in both the derived class and the based class. Now if we call this function using the object of the derived class. Compiler will call which
function and elaborate the same used by the compiler.
Q4: Suppose, the same function is defined in both the derived class and the based class. Now if we call this function using the object of the derived class. Compiler will call which
function and elaborate the same used by the compiler.
Q3: Write a program to perform basic to class conversion [Class name: “conversion” with data members: feet and inches (both int)] Convert basic type(int) height in terms of total number of inches into equivalent feet and inches (class type) and display output on screen.
Q3: Write a program to perform basic to class conversion [Class name: “conversion” with data members: feet and inches (both int)] Convert basic type(int) height in terms of total number of inches into equivalent feet and inches (class type) and display output on screen.
Q1: Write a program to take input for n number of doctor records and write records of all cardiologists in a file named: “record1”. Also write records of all those doctors in another file named: “record2” who are taking salary more than INR 80,000. After writing records in both files, merge their contents in another file: “finalrecord” and read all records of “finalrecord” file and display on screen. [Attributes of doctor: doc_id, doc_name, doc_specialization, doc_salary]
Write a program to overload binary + operator using friend function to add values entered in kilo meters and meters and to overload binary – operator using member function to subtract values entered in kilograms and grams
1 The first method to be called should ask a salesperson for the dollar value of daily sales and return the entered value to the Main() method.
2 The second method to be called should calculate the salesperson’s commission based on the rates in the following table.
Sales
Commission
$0 to $999
3%
$1000 to $2999
4%
$3000 and up
5%
Define a class RationalNumber with suitable data members and member function.
Overload the different operators participating in the following expression to get the result
O7 = ((O1 >= O2) + (O3 && O4) * (O5 < O6)) + O1 + O5;
cout<<O7;
[Here O1, O2, O3, O4, O5, O6 and O7 are objects of the class RationalNumber]
Define a class RationalNumber with suitable data members and member function.
Overload the different operators participating in the following expression to get the result
write the code for round robin scheduling algorithm?