QUESTION PROVIDED IN ATTACH IMAGE KINDLY SEE. AND BELOW TEMPLATES PROVIDED CHECK THIS BEFORE MAKING SOLUTION ( main.cpp , fuel.cpp , petrol.cpp , liquid.cpp . )

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

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

};

Write a C++ program to implement multiple inheritance concepts and calculate the heat of
combustion.
Strictly adhere to the Object-Oriented specifncations given in the problem statement. All class
names, member variable names, and function names should be the same as specified in the
problem statement.
Problem Constraint:
Heat of combustion (9.-12400-2.100
Where Q, is measured in calories per gram and dis the specific gravity at 60 "F (16 "C)
The class Liquid has the following private data members.
Data Type
hoat
Variable Name
kpecifeGravity
Include necessary constructors, petters, and setters
In the Liquid class include the following member function.
Function name Description
Mold display This function is used to display the specitc gravity
The class Fuel has the following private data members.
Data Type
loat
Variable Name
rate
Include necessary constructors petters, and setters
In the Fuel class, include the following member function.
Function name Description
Vold display This function is used to display the fuel rate per litre
The class Petrol derived from Lievid class and Fuel class has the following private data members.
Data Type
loat
string
Variable Name
heatCombustion
type
Include necessary constructors, petters, and setters
In the Petrol class, Include the following member function
Function name
Description
This function is used to calculate the heat of combustion using the following formula
Heat of combustion(QJ-12.400-2.100s.
This function is used to display the heat of combustion value and to call the display function
in the base class Liquid and fuel. Display heat of combustion value with respect to two decimal places.
Vold calculateHeatCombustion
vold displayo
In the main method, get the specific pravity, fuel rate per titre, and petrol type from the user.
Create an object for the derived class and call the derived class display method.
Input and Output format:
Refer sample input and output for formatting speciications.
(AH Texts in bold corresponds to the input and the remaining corresponds to the output)
Sample Input and Output:
Enter the specific gravity
0.7
Enter fuel rate per litre:
0.99
Petrol type
Premium
Fuel Detals:
Specinic gravity:0.7
Fuel rate per liter:0.99
Heat of combustion(Q1137100
Transcribed Image Text:Write a C++ program to implement multiple inheritance concepts and calculate the heat of combustion. Strictly adhere to the Object-Oriented specifncations given in the problem statement. All class names, member variable names, and function names should be the same as specified in the problem statement. Problem Constraint: Heat of combustion (9.-12400-2.100 Where Q, is measured in calories per gram and dis the specific gravity at 60 "F (16 "C) The class Liquid has the following private data members. Data Type hoat Variable Name kpecifeGravity Include necessary constructors, petters, and setters In the Liquid class include the following member function. Function name Description Mold display This function is used to display the specitc gravity The class Fuel has the following private data members. Data Type loat Variable Name rate Include necessary constructors petters, and setters In the Fuel class, include the following member function. Function name Description Vold display This function is used to display the fuel rate per litre The class Petrol derived from Lievid class and Fuel class has the following private data members. Data Type loat string Variable Name heatCombustion type Include necessary constructors, petters, and setters In the Petrol class, Include the following member function Function name Description This function is used to calculate the heat of combustion using the following formula Heat of combustion(QJ-12.400-2.100s. This function is used to display the heat of combustion value and to call the display function in the base class Liquid and fuel. Display heat of combustion value with respect to two decimal places. Vold calculateHeatCombustion vold displayo In the main method, get the specific pravity, fuel rate per titre, and petrol type from the user. Create an object for the derived class and call the derived class display method. Input and Output format: Refer sample input and output for formatting speciications. (AH Texts in bold corresponds to the input and the remaining corresponds to the output) Sample Input and Output: Enter the specific gravity 0.7 Enter fuel rate per litre: 0.99 Petrol type Premium Fuel Detals: Specinic gravity:0.7 Fuel rate per liter:0.99 Heat of combustion(Q1137100
Expert Solution
steps

Step by step

Solved in 5 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY