Define a class Flight in C++ …
CBSE, JEE, NEET, CUET
Question Bank, Mock Tests, Exam Papers
NCERT Solutions, Sample Papers, Notes, Videos
Define a class Flight in C++ with the following specification:
Private Members:
1. A datamember Flightnumber of type integer
2. A datamember Destination of type string
3. A dataember Distance of float type
4. A datamember fuel of type float
A Member function CalFuel() to calculate value of fuel as per the following criteria:
Distance. Fuel
Less than or equal to 1000. 500
More than 1000 and less than or equal to 2000. 1100
More than 2000. 2200
Public members:
A function Feed_info() to allow user to enter values for Flight number, destination, distance and Call function CalFuel() to calculate the quantity of fuel
A Function show_ fuel to allow user to view the content of all the data members
Posted by Sayanth Manoj 7 years, 2 months ago
- 0 answers
ANSWER
Related Questions
Posted by Hanni Pham 1 year, 1 month ago
- 0 answers
Posted by Kandeepan Jothivel 1 year, 4 months ago
- 2 answers
Posted by Priya Shukla 1 year, 3 months ago
- 1 answers
Posted by Prawar Narang 1 year, 3 months ago
- 1 answers
Posted by Hanni Pham 1 year, 1 month ago
- 1 answers
Posted by Syedali Fathima 1 year, 3 months ago
- 1 answers
myCBSEguide
Trusted by 1 Crore+ Students
Test Generator
Create papers online. It's FREE.
CUET Mock Tests
75,000+ questions to practice only on myCBSEguide app