You are going to make a Flight-Runway Simulator. At program start, you will have Five (5)...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
You are going to make a Flight-Runway Simulator. At program start, you will have Five (5) Airplanes in the sky. Each will have 100 Gallons of Fuel remaining. You will ask the user, if a plane should be landed or the fuel reduced (mimicking the flight burning fuel). For instance, when your program runs, it should show: There are 5 planes in the Sky. a. Land the Plane b. Reduce Fuel c. Quit Program Enter your Choice:__ (Let's say the user enters a) Enter your Choice: a Now the menu should show all planes in the sky with their fuel level. Plane 1- Fuel Level: 100 Gallons Plane 2- Fuel Level: 100 Gallons Plane 3 - Fuel Level: 100 Gallons Plane 4 - Fuel Level: 100 Gallons Plane 5 - Fuel Level: 100 Gallons Which Plane Should Land: (Let's say the user enters 3) Which Plane Should Land: 3 Plane 3 has landed. There are 4 planes in the Sky. a. Land the Plane b. Reduce Fuel c. Quit Program Enter your Choice:__ (Let's say the user enters b now) Enter your Choice: b Now the menu should show all planes in the sky with their fuel level. Plane 1- Fuel Level: 100 Gallons Plane 2- Fuel Level: 100 Gallons Plane 4 - Fuel Level: 100 Gallons Plane 5 - Fuel Level: 100 Gallons How many Planes Should have their Fuel Level Reduced:_ (Let's say the user enters 2) How many Planes Should have their Fuel Level Reduced: 2 You randomly select any two planes, and reduce their fuel by 15 Gallons. For instance: Plane 2 Fuel Level reduced by 15 Gallons. Plane 5 Fuel Level reduced by 15 Gallons. There are 4 planes in the Sky. a. Land the Plane b. Reduce Fuel c. Quit Program Enter your Choice:__ (Let's say the user enters a now) Enter your Choice: a Now the menu should show all planes in the sky with their fuel level. Plane 1- Fuel Level: 100 Gallons Plane 2- Fuel Level: 85 Gallons Plane 4 - Fuel Level: 100 Gallons Plane 5 - Fuel Level: 85 Gallons Which Plane Should Land:_ (Let's say the user enters 2) Which Plane Should Land: 2 Plane 2 has landed. There are 3 planes in the Sky. a. Land the Plane b. Reduce Fuel c. Quit Program Enter your Choice:__ And so on... Log all inputs from the user, and all messages shown to the user in a .txt file called FlightSimulator. Note: You have to keep track of the variables, etc. (I am not telling you. Figure out how and which variables to keep yourself), and give appropriate messages. WRITE functions ! All code in the main is NOT acceptable. You are going to make a Flight-Runway Simulator. At program start, you will have Five (5) Airplanes in the sky. Each will have 100 Gallons of Fuel remaining. You will ask the user, if a plane should be landed or the fuel reduced (mimicking the flight burning fuel). For instance, when your program runs, it should show: There are 5 planes in the Sky. a. Land the Plane b. Reduce Fuel c. Quit Program Enter your Choice:__ (Let's say the user enters a) Enter your Choice: a Now the menu should show all planes in the sky with their fuel level. Plane 1- Fuel Level: 100 Gallons Plane 2- Fuel Level: 100 Gallons Plane 3 - Fuel Level: 100 Gallons Plane 4 - Fuel Level: 100 Gallons Plane 5 - Fuel Level: 100 Gallons Which Plane Should Land: (Let's say the user enters 3) Which Plane Should Land: 3 Plane 3 has landed. There are 4 planes in the Sky. a. Land the Plane b. Reduce Fuel c. Quit Program Enter your Choice:__ (Let's say the user enters b now) Enter your Choice: b Now the menu should show all planes in the sky with their fuel level. Plane 1- Fuel Level: 100 Gallons Plane 2- Fuel Level: 100 Gallons Plane 4 - Fuel Level: 100 Gallons Plane 5 - Fuel Level: 100 Gallons How many Planes Should have their Fuel Level Reduced:_ (Let's say the user enters 2) How many Planes Should have their Fuel Level Reduced: 2 You randomly select any two planes, and reduce their fuel by 15 Gallons. For instance: Plane 2 Fuel Level reduced by 15 Gallons. Plane 5 Fuel Level reduced by 15 Gallons. There are 4 planes in the Sky. a. Land the Plane b. Reduce Fuel c. Quit Program Enter your Choice:__ (Let's say the user enters a now) Enter your Choice: a Now the menu should show all planes in the sky with their fuel level. Plane 1- Fuel Level: 100 Gallons Plane 2- Fuel Level: 85 Gallons Plane 4 - Fuel Level: 100 Gallons Plane 5 - Fuel Level: 85 Gallons Which Plane Should Land:_ (Let's say the user enters 2) Which Plane Should Land: 2 Plane 2 has landed. There are 3 planes in the Sky. a. Land the Plane b. Reduce Fuel c. Quit Program Enter your Choice:__ And so on... Log all inputs from the user, and all messages shown to the user in a .txt file called FlightSimulator. Note: You have to keep track of the variables, etc. (I am not telling you. Figure out how and which variables to keep yourself), and give appropriate messages. WRITE functions ! All code in the main is NOT acceptable.
Expert Answer:
Related Book For
Posted Date:
Students also viewed these programming questions
-
List three specific parts of the Case Guide, Objectives and Strategy Section (See below) that you had the most difficulty understanding. Describe your current understanding of these parts. Provide...
-
Read the case study "Southwest Airlines," found in Part 2 of your textbook. Review the "Guide to Case Analysis" found on pp. CA1 - CA11 of your textbook. (This guide follows the last case in the...
-
Define the necessary and sufficient condition for two transactions to be serialisable. Give an example of a non-serialisable execution of a pair of transactions. [3 marks] (c) Define the necessary...
-
How the companies do involved benefit from the innovations discussed in the case? Is it about more efficient transaction processing, better reaching out to customers, or both?
-
Compare the shadow-paging recovery scheme with the log-based recovery schemes in terms of ease of implementation and overhead cost.
-
Prepare a balance sheet and income statement for Kronlokken Company from the following scrambled list of items. a. Prepare a common-sized income statement and a common-sized balance sheet. Interpret...
-
On April 2, 2013, Montana Mining Co. pays $ 3,721,000 for an ore deposit containing 1,525,000 tons. The company installs machinery in the mine costing $ 213,500, with an estimated seven- year life...
-
Which one of the metal atoms whose electronic structure given below forms a nitrate of the type M(NO3)2? 37 A. 2.8.0 B. 2.8.1 C. 2.8.2 D. 2.8.3
-
On December 1, 2020, Papadopoulos Seasonings had the following account balances. During December, the company completed the following transactions. Dec. 7 Received 3,600 cash from customers in...
-
A small city has 2 ambulances. Emergency calls for the ambulances arrive randomly with an average of 0.2 calls per hour. They are concerned about the possibility of both ambulances being busy when an...
-
What is a volatility surface?
-
The theta of a call option is -0.1. What does this mean?
-
Determine the impulse response of the following recursive system: \[y(n)-y(n-1)=x(n)-x(n-5) .\]
-
What is the delta of (a) a forward contract and (b) a futures contract on an asset that provides no income?
-
Determine the steady-state response of the system governed by the following difference equation: \[12 y(n)-7 y(n-1)+y(n-2)=\sin \left(\frac{\pi}{3} n ight) u(n) \text {. }\]
-
Select 2 countries, one with a current account deficit (other than Turkey) and one with a current account surplus. Find their current account balance as a percentage of GDP between the years...
-
How does Kant answer Humes bundle theory of self? Do you think he is successful?
-
A taxpayer is president of a company. He is very wealthy and has a good deal of assets. He went to Bank 1 in January, Yr. 1, to borrow $1,000,000. The loan proceeds were used to purchase stock. The...
-
What is the purpose of a protest letter? How does the purpose impact the style you use in writing one?
-
Citate and determine the reliability of the following: a. Rev. Rul. 56-136 b. Rev. Rul. 62-180 c. Rev. Rul. 62-213
-
If \($5\),000 is borrowed today and \($8\),955 is paid back in 10 years, what interest rate compounded annually has been earned?
-
With interest at 6 percent compounded annually, what is the fewest number of years (integer-valued) required for money to triple in magnitude?
-
With interest at 9 percent compounded annually, what is the fewest number of years (integer-valued) required for money to double in magnitude?
Study smarter with the SolutionInn App