Question: 1 EE 1 6 0 Homework 1 1 - Building - up a program... one layer at a time Background: An aircraft reaches a cruising

1 EE 160 Homework 11- Building-up a program... one layer at a time
Background:
An aircraft reaches a cruising speed of 180ms(meters per second), and the engine throttles
are set so that the power level is increased. The aircraft then starts to accelerate but the faster
it goes, the more aerodynamic drag it experiences (in proportion to the square of the air
speed). Eventually, the aircraft reaches a new top speed when the thrust force equals the
aerodynamic drag. The equations used to estimate the velocity and acceleration of the aircraft
from the time that the throttle is reset until the plane reaches its new cruise speed is as follows:
Velocity =0.000001 time ?(()3)-0.00488 time ?(()2)+0.75795 time +181.3566
Acceleration =3-0.000062 Velocity ?(()2)
Velocity is in units of ms, Acceleration is in ms2 and time is in ' s '.
Instructions:
Basic pseudocode & flowchart - Write pseudocode to ask the user to enter a time value
in seconds. Compute & display the velocity and acceleration for that given time value.
Assume the user enters in a time value between 0 and 120 seconds. Complete the
flowchart for the above.
Basic source code - Write the C code, compile and test it. Save/submit this C code as
hw11a.c
Error-handling pseudocode & flowchart - Display an appropriate error message to the
user if the input time is negative or above 120 seconds. Think about how to modify the
existing pseudocode & flowchart. At what point do you add the 'if' statement? Save this
new pseudocode + flowchart.
Error-handling source code - Change your source code, compile and run it to test it.
Save and submit this C code as hw11b.c
Planning for even more error-handling - Display an appropriate error message to the
user if a non-numerical input is entered (in C syntax, this would use isdigit()). You only
need to submit the updated flowchart & pseudocode.
Test-dataset - when all the above is complete, you can test the source code for hw11b.c using
the following test dataset. Submit the run-output so that it can be graded:
Time input of 0.23 seconds,
Time input of 3.891555666 seconds,
Time input of 25 seconds,
Time input of -3 seconds,
Time input of 12000 seconds,
Time input of "abc".
Deliverables:
This homework is due Monday
EE 160 Homework 11 Building-up a program... one layer at a time
Background:
An aircraft reaches a cruising speed of 180 m/s (meters per second), and the engine throttles
are set so that the power level is increased. The aircraft then starts to accelerate but the faster
it goes, the more aerodynamic drag it experiences (in proportion to the square of the air
speed). Eventually, the aircraft reaches a new top speed when the thrust force equals the
aerodynamic drag. The equations used to estimate the velocity and acceleration of the aircraft
from the time that the throttle is reset until the plane reaches its new cruise speed is as follows:
Velocity =0.000001 time30.00488 time2+0.75795 time +181.3566
Acceleration =30.000062 Velocity2
Velocity is in units of m/s, Acceleration is in m/s2 and time is in s.
Instructions:
1. Basic pseudocode & flowchart - Write pseudocode to ask the user to enter a time value
in seconds. Compute & display the velocity and acceleration for that given time value.
Assume the user enters in a time value between 0 and 120 seconds. Complete the
flowchart for the above.
2. Basic source code - Write the C code, compile and test it. Save/submit this C code as
hw11a.c
3. Error-handling pseudocode & flowchart - Display an appropriate error message to the
user if the input time is negative or above 120 seconds. Think about how to modify the
existing pseudocode & flowchart. At what point do you add the if statement? Save this
new pseudocode + flowchart.
4. Error-handling source code - Change your source code, compile and run it to test it.
Save and submit this C code as hw11b.c
5. Planning for even more error-handling - Display an appropriate error message to the
user if a non-numerical input is entered (in C syntax, this would use isdigit()). You only
need to submit the updated flowchart & pseudocode.
Test-dataset when all the above is complete, you can test the source code for hw11b.c using
the following test dataset. Submit the run-output so that it can be graded:
Time input of 0.23 seconds,
Time input of 3.891555666 seconds,
Time input of 25 seconds,
Time input of -3 seconds,
Time input of 12000 seconds,
Time input of abc.
Deliverables:
1. flowchart 11a + pseudocode 11a 4 points
2. hw11a.c (basic source code)4 points
3. flowchart 11b + pseudocode 11b 4 points
4. hw11b.c (error-handling #1)4 points
5. flowchart 11c + pseudocode 11c (error-handling #2)4 points
1 EE 1 6 0 Homework 1 1 - Building - up a

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!