Write a C++ program to calculate the gravity of the petrol using multiple inheritance Strictly adhere to the Object-Oriented specifications given in the problem statement. All class names, member variable names, and function names should be the same as specified in the problem statement. Consider a class Liguid with the following protected member variable
QUESTION PROVIDED IN ATTACH IMAGE KINDLY SEE. PROVIDE OUTPUT AS IT IS SHOWN IN QUESTION.
AND BELOW TEMPLATES PROVIDED CHECK THIS BEFORE MAKING SOLUTION ( main.cpp , donor.cpp , address.cpp )
----------------- TEMPLATES BELOW FOR SOLUTION -----------------------
main.cpp template
#include<iostream> using namespace std; #include "PetrolBO.cpp" int main() { cout<<"Enter the details\n"; cout<<"Enter the density of the petrol"; cin>>density; cout<<"Enter the rate of the petrol"; cin>>rate; cout<<"Enter the thermal conductivity of the petrol"<<endl; cin>>thermalConductivity; //Fill your code here return 0; } |
Petrol.cpp template
#include<iostream>
|
Fuel.cpp template
#include<iostream>
|
Liquid.cpp template
#include<iostream>
|
petrolBo.cpp template
#include<iostream> using namespace std; #include"Petrol.cpp" class PetrolBO { public: void display(Petrol p) { //Fill your code here } }; |
Step by step
Solved in 6 steps with 1 images