1. Engineering
  2. Computer Science
  3. please type up the code...

Question: please type up the code...

Question details

Please type up the code

Question 2 (10 marks) You are involved in the development of an aircraft engine, the propfan or open rotor engine (see https://en. wikipedia.org/wiki/Propfan). A plane with mass 20 000 kg reaches a speed of 180 m/s where the engine applies a force of 40 000 newtons. When the pilot increases the engines power to 60 000 newtons and the plane accelerates, the following equation gives the change in speed after the increase in power (a new speed is reached after about 120 s) v- 0.00001t3-0.00488t2 +0.75795t +181.3566 where v is the planes speed in m/s and t is the time in seconds (t-0 when the engines power is increased to 60 000 newtons) Develop a program that computes the speed of the plane at a given time t. The user will provide the value of the time. Test your program with the following test cases Timet Speedi 0.00 2.00 10.00 188.45810 50.00 208.30410 100.00 218.35160 120.00 219.31860 181.35660 182.85306 Guidelines: Logic/Strategies In the main function o Consider using the following local variables for the speed of the plane, t: for the time t, o Prompt the user for the time t. Use short and appropriate prompt messages. Read the values from the keyboard and assign them respectively to the variable t. o Call a function, say calculatespeed, to calculate the speed of the plane. Store the result returned by the function in the variable v. You will need to define this function in your program. Display the results with a message of the following form: At time 0.0, the speed of the plane is 181.3566 m/s o . For the function calculatespeed o Consider using the following parameters t: for the value of time o Consider using the following local variables speed: for storing the speed of the plane at time t (note that this variable will contain the value returned) The function calculates speed of the plane (see the equation given at the beginning of the question), stores it in the variable speed and returns the value stored in speed. o Test the program using the values provided in the table above. In your assignment file, give the output of your program for all test cases.

The answer to this question should provide: 1) The source code to vour program (also insert the source code into the assignment file), 2) The output showing the results of all the test cases, insert the output into the assignment file. The following is an example of the output for the first test case. 酊DAUofOCoursesCurrentCoursesNGNG1106Fall2018AssignmentsAl Please give the time t (s) after the planes acceleration : 0.0 t time e.eee80, the speed of the plane is 181.3566e0 m/s Process returned 59 (0x3B excution time 2.747s Press any key to continue.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution