Question: Problem 3: Intersecting Point Suppose two line segments intersect. The two endpoints for the first line segment are (x1, y1) and (x2, y2) and for

 Problem 3: Intersecting Point Suppose two line segments intersect. The twoendpoints for the first line segment are (x1, y1) and (x2, y2)

Problem 3: Intersecting Point Suppose two line segments intersect. The two endpoints for the first line segment are (x1, y1) and (x2, y2) and for the second line segment are (x3, y3) and (x4, y4). Write a program that prompts the user to enter these four endpoints and displays the intersecting point. Note: The intersecting point can be found by solving the following linear equation: Use the LinearEquation class in the previous problem to solve this equation and find the intersecting point. Sample input/Output Enter x1, y1, x2, y2, x3, y3, x4, y4: 1.5 7 5 -0.5-3 -1.25 4.6 The intersecting point is: (3.22, 3.31) Enter x1, y1, x2, y2, x3, y3, x4, y4: 3 6 -26 4.5 3-5.6 3 The two lines do not cross Problem 2: Linear Equation Design a class named LinearEquation for a 2 2 system of linear equations: ar +by-eed bf af -ec x+ dy-ad-bcad-be The class should implement: A constructor with arguments The get methods for all private data fields A method named isSolvable() that returns true if ad bc is not 0 Methods getX0) and getY() that return the solution for the equation. . . Write a test program that prompts the user to enter a, b, c, d, e, and f and displays the result. If ad bc is 0, output that "The equation has no solution." Sample input/Output Enter a, b, c, d, e, f: 1-2 3 -4 57 x is -3.00 and y is -4.00

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!