subject
Engineering, 13.11.2019 01:31 taylorbean315

Write a program that will find the pairs of coordinates that are closest to each other, as if these were 2 planes in space, flying too close to each other. report of the 2 pairs of coordinates that are closest to each other. display a warning message such as: "alert, alert! plane at coordinate: x-axis, y-axis is too close to plane at coordinate: x-axis, y-axis." hints: 1.) define a class that can hold 2 coordinates. call it the location class. implement the comparable interface, and thus create a compareto() method. 2.) create an array of location objects, from reading the input file. (note: the first record in the input file contains the number of records in the file). 3.) sort the array by either x- or y-coordinate (use either the insertion sort or the selection sort algorithm. do not use collections. 4.) compare each object in the sorted array with the previous object, and calculate their distance by using the distance formula below: double distancebetween2points = math. sqrt((x2 - x1)^2 + (y2 - y1)^2) note: to get the square of a number in java, use math. pow(base, exponent) 5.) good luck! their safety depends on you! note: to process the input file that contains spaces and commas separating each word in each record, use the following method to specify multiple delimeters:

ansver
Answers: 3

Another question on Engineering

question
Engineering, 04.07.2019 08:10
Which of the following is an easy way to remember the modified “x” tire rotation? a. nondrive wheels straight, cross the drive wheels b. drive wheels straight, cross the nondrive wheels c. drive wheels crossed, nondrive wheels straight d. drive wheels crossed, nondrive wheels crossed
Answers: 1
question
Engineering, 04.07.2019 18:10
Air is to be cooled in the evaporator section of a refrigerator by passing it over a bank of 0.8-cm-outer-diameter and 0.4-m-long tubes inside which the refrigerant is evaporating at -20°c. air approaches the tube bank in the normal direction at 0°c and 1 atm with a mean velocity of 4 m/s. the tubes are arranged in-line with longitudinal and transverse pitches of sl- st 1.5 cm. there are 30 rows in the flow direction with 15 tubes in each row. determine (a) the refrigeration capacity of this system and (b) pressure drop across the tube bank. evaluate the air properties at an assumed mean temperature of -5°c and 1 atm. is this a good assumption?
Answers: 1
question
Engineering, 04.07.2019 18:10
Asingle-geared blanking press has a stroke of 200 mm and a rated capacity of 320 kn. a cam driven ram is assumed to be capable of delivering the full press load at constant force during the last 15 percent of a constant-velocity stroke. the camshaft has an average speed of 90 rev/min and is geared to the flywheel shaft at a 6: 1 ratio. the total work done is to include an allowance of 16 percent for friction a) estimate the maximum energy fluctuation b) find the rim weight for an effective diameter of 1.2 m and a coefficient of speed fluctuation of 0.10
Answers: 1
question
Engineering, 04.07.2019 18:10
Determine whether or not it is possible to compress air adiabatically from k to 140 kpa and 400 k. what is the entropy change during this process?
Answers: 3
You know the right answer?
Write a program that will find the pairs of coordinates that are closest to each other, as if these...
Questions
question
Biology, 22.08.2020 02:01
Questions on the website: 13722363