Inheritance- Code with Harry-Lecture 41 solution (Multiple inheritance)
Create 2 classes: 1. SimpleCalculator - Takes input of 2 numbers using a utility function and perfoms +, -, *, / and displays the results using another function. 2. ScientificCalculator - Takes input of 2 numbers using a utility function and perfoms any four scientific operation of your chioice and displays the results using another function. Create another class HybridCalculator and inherit it using these 2 classes: Q1. What type of Inheritance are you using? Q2. Which mode of Inheritance are you using? Q3. Create an object of HybridCalculator and display results of simple and scientific calculator. Q4. How is code reusability implemented? Ans1. Multiple level inheritance Ans2. Public mode Ans3. #include <iostream> #include <cmath> using namespace std; class SimpleCalculator { protected: float result; int number_1,number_2; char operand; public: void get_number(int n1,int n2) { number_1=