The world’s Largest Sharp Brain Virtual Experts Marketplace Just a click Away
Levels Tought:
University
| Teaching Since: | Apr 2017 |
| Last Sign in: | 438 Weeks Ago, 2 Days Ago |
| Questions Answered: | 9562 |
| Tutorials Posted: | 9559 |
bachelor in business administration
Polytechnic State University Sanluis
Jan-2006 - Nov-2010
CPA
Polytechnic State University
Jan-2012 - Nov-2016
Professor
Harvard Square Academy (HS2)
Mar-2012 - Present
 (Geometry: intersecting point) Write a method that returns the intersecting point of two lines. The intersecting point of the two lines can be found by using the formula shown in Programming Exercise 3.25. Assume that (x1, y1) and (x2, y2) are the two points on line 1 and (x3, y3) and (x4, y4) are on line 2. The method header is
Â
public static double[] getIntersectingPoint(double[][] points)
Â
The points are stored in a 4-by-2 two-dimensional array points with (points[0][0], points[0][1]) for (x1, y1). The method returns the inter- secting point or null if the two lines are parallel. Write a program that prompts the user to enter four points and displays the intersecting point. See Program- ming Exercise 3.25 for a sample run.9
imp-----------ort----------- ja-----------va.-----------uti-----------l.S-----------can-----------ner----------- ; -----------pub-----------lic----------- cl-----------ass----------- Ex-----------erc-----------ise-----------_31----------- { -----------sta-----------tic----------- fi-----------nal----------- in-----------t X----------- = -----------0 ;----------- st-----------ati-----------c f-----------ina-----------l i-----------nt -----------Y =----------- 1 -----------; p-----------ubl-----------ic -----------sta-----------tic----------- vo-----------id -----------mai-----------n (-----------Str-----------ing-----------[] -----------arg-----------s) -----------{ S-----------can-----------ner-----------