QUESTION PROVIDED IN ATTACH IMAGE KINDLY SEE.
AND BELOW TEMPLATES PROVIDED CHECK THIS BEFORE MAKING SOLUTION ( main.cpp , fuel.cpp , petrol.cpp , liquid.cpp . )
-------------------Templates Below----------------------
main.cpp template
#include <iostream> #include <iomanip> #include "Petrol.cpp" using namespace std; int main() {
//fill your code here.
return 0;
}
|
fuel.cpp template
#include <iostream> #include<stdio.h> using namespace std; class Fuel {
//fill your code here
};
|
petrol.cpp template
#include <iostream> #include <iomanip> #include "Liquid.cpp" #include "Fuel.cpp" using namespace std; class Petrol: public Liquid, public Fuel {
//fill your code here.
};
|
liquid.cpp template
#include <iostream> #include<stdio.h> using namespace std; class Liquid {
//fill your code here
};
|