How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask R.R. Jha Your Own Question
R.R. Jha
R.R. Jha, Tutor
Category: Homework
Satisfied Customers: 5471
Experience:  B.Tech
Type Your Homework Question Here...
R.R. Jha is online now
A new question is answered every 9 seconds


This answer was rated:

The FAA has recently come under fire for not establishing better technologies to save the lives of passengers on flights unfortunate enough to experience mid-air collisions. These mid-air collisions are the result of distance closing faster than the airplane can be made to react. A brilliant aerospace engineer has designed a passenger jet that constantly monitors radar signatures for input. It calculates the distance between the plane and any other objects within the plane's area of concern up to 3 miles away. Though the plane is agile, it has a threshold of a 10s reaction time. That is to say, the plane can be made to safely avert an object it's headed for collision with so long as it has at least 10s to react. If the pilot has not reacted within 20s the system begins to prepare itself to react on behalf of the pilot. If the plane cannot react by averting disaster, it will eject all 400 passengers from their seats in a safe "cocoon-like" pod that drifts to the earth below using parachutes. That is to say, if for some reason the time to react, based on the plane's speed and object's speed is too short to avert a collision, the plane will launch an escape sequence to save the passengers. Your job is to write a program that receives distance and speed values for the plane and the closest moving object to the plane. The program must calculate the time to impact. If the time to impact, based on the parameters above, is less that 10s then the program will signal the plane to launch the passengers to safety. I need help doing the psuedocode, flowchart and the source code to create this program. I have tried to do them and am getting it wrong. Please help.




the code i have come up with is


public class Plane {

public static void main(String[] args) {

double distance, planeSpeed, objectSpeed;
double timeToCollision;

Scanner input = new Scanner(;
System.out.print("Enter distance of nearest object: ");
distance = input.nextDouble();
System.out.print("Enter speed of the plane: ");
planeSpeed = input.nextDouble();
System.out.print("Enter speed of the object: ");
objectSpeed = input.nextDouble();

timeToCollision = distance / (planeSpeed + objectSpeed);

if (timeToCollision >= 10) {
System.out.println("\nAvert object!");
} else {
System.out.println("\nEject passengers!");



but it gives me errors and won't compile. I use


Hello and welcome back!

Seems like the issue isn't completely solved. I'll try to make a video/screenshots of how to run it on Ideone and send to you. That should clarify everything.
Customer: replied 3 years ago.

Ok, thank you


You need to spend $3 to view this post. Add Funds to your account and buy credits.
R.R. Jha and 5 other Homework Specialists are ready to help you