Question: I need the code of this program in java 1. The equation of a line can be represented by y = mx + C, where
1. The equation of a line can be represented by y = mx + C, where mand care double numbers. Write a java program that does the following: a. Prompts the user to enter the equations of two lines by entering the coefficients m and cand reads the values. Then, prints the two entered line equations. b. Identifies and prints out whether the two lines intersect or not. If they intersect at one point, then print the point of intersection. If the two lines are parallel, print that the two lines are parallel. (For parallel lines, the m values are same for the both equations of the lines; if the lines intersect each other there must be one point where the values of x and y axis is same for the both equations, you should use your college level mathematics understanding to solve this problem and implement the java code accordingly) Sample output of the program: Enter the coefficients of the first line: 2 3 The first line equation is: Y = 2.0 X +3.0 Enter the coefficients of the second line: -0.5 7 The second line equation is: Y = -0.5 X 7.0 The two lines intersect at the point (1.6.6.2) Press any key to continue ... Enter the coefficients of the first line: 2 2 The first line equation is: Y-2.0 X 2.9 Enter the coefficients of the second line : 26 The second line equation is: Y-2.9 X +6.0 The two lines are parallel and do not intersect... Press any key to continue
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
