-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtut42.cpp
28 lines (23 loc) · 923 Bytes
/
tut42.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Exercise on C++ Inheritance
#include<iostream>
using namespace std;
/*
Create 2 classes:
1. SimpleCalculator - Takes input of 2 numbers using a utility
function and performs + , - , * , / and displays the results using
another function .
2. ScientificCalculator - Takes input of 2 numbers using a
utility function and performs any four scientific operation
of your choice 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 ?
Ans1 Multiple inheritance
Q2. Which mode of inheritance are you using ?
Ans2 Both publically
Q3. Create an object of HybridCalculator and display resluts of simple and
scientific calculator .
Q4. How is code reusability implented?
*/
int main(){
return 0;
}