Question: I have this Java programming problem: The technical specifications are as follows: The missile Is fired at Mexico at 12:30PM Flies an elliptical path (with

I have this Java programming problem:

The technical specifications are as follows:

The missile

Is fired at Mexico at 12:30PM

Flies an elliptical path (with a major radius of 5000km and a minor radius of 50km) which is 15709km long.

Travels each of the 180 x 1 segments in which it can be targeted by the laser in 43.635s; and

The laser

Is 5000km between Mexico and Australia directly below the path of the missile;

Requires 65s to charge before it may be fired;

Moves in 1 increments where 0 is along the ground to Mexico, 90 is straight up, and 180 is along the ground to Australia;

Requires 35s to move 1 (and starts perpendicular to the ground, i.e. at 90);

Should only be fired at degrees in the range 1179;

May move while being charged; and

Fires instantly for an infinite distance destroying anything in its path. Given an angle t in the range of 0180 for the direction of the laser, the position of the missile on its elliptical path is the coordinate (x,y) where x=5000*Math.cos(r) and y=50*Math.sin(r). r is the value t converted to radians and the conversion can be done with a built-in method: r=Math.toRadians(t);

If the missile will be at this coordinate at the time the laser is aiming there then this is a firing solution.

Firing solutions consist of:

the time the laser should be fired;

the degree at which the laser should be aimed; and

the resulting coordinate at which impact with the missile would occur

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 Databases Questions!