Q:

(Physics: finding runway length) Given an airplane’s acceleration a and take-off speed v, you can compute the minimum runway length needed for an airplane to take off using the following formula:

0

(Physics: finding runway length) Given an airplane’s acceleration a and take-off speed v, you can compute the minimum runway length needed for an airplane to take off using the following formula:

Write a program that prompts the user to enter v in meters/second (m/s) and the acceleration a in meters/second squared (m/s2), and displays the minimum runway length. Here is a sample run:

Output:

Enter speed and acceleration: 60 3.5
The minimum runway length for this airplane is 514.286

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

/*
(Physics: finding runway length) Given an airplane’s acceleration a and take-off
speed v, you can compute the minimum runway length needed for an airplane to
take off using the following formula:
												v^2
									length = ---
												 2a
Write a program that prompts the user to enter v in meters/second (m/s) and the
acceleration a in meters/second squared (m/s2), and displays the minimum runway
length.
*/
import java.util.Scanner;

public class Exercise_02_12 {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);	// Create new Scanner object.

		// Prompt user to enter the airplane's acceleration a and take-off spead v.
		System.out.print("Enter speed and acceleration: ");
		double speed = input.nextDouble();
		double acceleration = input.nextDouble();

		// Compute the minimum runway length 
		// needed for an airplane to take off.
		double length = Math.pow(speed, 2) / (2 * acceleration);

		// Display result
		System.out.println("The minimum runway length for this" +
								 " airplane is " + length);
	}
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now