1- Write a Java code that asks the user to enter the integer (x, y) coordinates...
Fantastic news! We've Found the answer you've been seeking!
Question:
![1- Write a Java code that asks the user to enter the integer (x, y) coordinates of two points that form a](https://dsd5zvtm8ll6.cloudfront.net/questions/2023/11/656600a52035f_1701273632467.jpg)
Transcribed Image Text:
1- Write a Java code that asks the user to enter the integer (x, y) coordinates of two points that form a straight line, reads these coordinates, and calculate the slope (a) and the slope-intercept (b) that form the equation of the straight line as follows: y = ax + b a = (y2 - Y₁)/(x2-X1) b = y2 - a*x2 Then ask the user to enter the integer (XA, YA) coordinate of a point A, read this data, and calculate the distance from this point A to the above straight line: Then you need to get the equation of the line that passes through A and is perpendicular to the original one as follows: The slope of the perpendicular line (ap) is the negative inverse of the slope of the original line: ap = -1/a The slope-intercept (be) of the perpendicular line is calculated by replacing the coordinates of point A into the equation: hectivate Wi Go to Settings 1- Write a Java code that asks the user to enter the integer (x, y) coordinates of two points that form a straight line, reads these coordinates, and calculate the slope (a) and the slope-intercept (b) that form the equation of the straight line as follows: y = ax + b a = (y2 - Y₁)/(x2-X1) b = y2 - a*x2 Then ask the user to enter the integer (XA, YA) coordinate of a point A, read this data, and calculate the distance from this point A to the above straight line: Then you need to get the equation of the line that passes through A and is perpendicular to the original one as follows: The slope of the perpendicular line (ap) is the negative inverse of the slope of the original line: ap = -1/a The slope-intercept (be) of the perpendicular line is calculated by replacing the coordinates of point A into the equation: hectivate Wi Go to Settings 1- Write a Java code that asks the user to enter the integer (x, y) coordinates of two points that form a straight line, reads these coordinates, and calculate the slope (a) and the slope-intercept (b) that form the equation of the straight line as follows: y = ax + b a = (y2 - Y₁)/(x2-X1) b = y2 - a*x2 Then ask the user to enter the integer (XA, YA) coordinate of a point A, read this data, and calculate the distance from this point A to the above straight line: Then you need to get the equation of the line that passes through A and is perpendicular to the original one as follows: The slope of the perpendicular line (ap) is the negative inverse of the slope of the original line: ap = -1/a The slope-intercept (be) of the perpendicular line is calculated by replacing the coordinates of point A into the equation: hectivate Wi Go to Settings 1- Write a Java code that asks the user to enter the integer (x, y) coordinates of two points that form a straight line, reads these coordinates, and calculate the slope (a) and the slope-intercept (b) that form the equation of the straight line as follows: y = ax + b a = (y2 - Y₁)/(x2-X1) b = y2 - a*x2 Then ask the user to enter the integer (XA, YA) coordinate of a point A, read this data, and calculate the distance from this point A to the above straight line: Then you need to get the equation of the line that passes through A and is perpendicular to the original one as follows: The slope of the perpendicular line (ap) is the negative inverse of the slope of the original line: ap = -1/a The slope-intercept (be) of the perpendicular line is calculated by replacing the coordinates of point A into the equation: hectivate Wi Go to Settings
Expert Answer:
Answer rating: 100% (QA)
Heres a Java code that accomplishes what youve described java import javautilScanner public class Li... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
Solve 3t2 - 30t + 6 = 96 by completing the square. NOTE: Enter your solutions exactly.
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
Ivanhoe Company incurred research and development costs of $ 9 0 0 0 0 to develop a patent, and legal fees of $ 3 0 0 0 0 to register the patent. The patent has a legal life of 2 0 years and a useful...
-
Identify each of the equations as representing either a circle, a parabola, an ellipse, a hyperbola, or none of these. (x + 1) 2 + (y + 1) 2 = 2(x + y + 1)
-
Fort Inc. prepares its cash flow statement using the direct method for operating activities. Identify the section of Fort Inc.'s cash flow statement where the results of each of the following...
-
SR 5.10 What is a nested if statement?
-
In which dimension of power and influence would a manager find the use of both position power and personal power most advantageous? (a) upward (b) lateral (c) downward (d) workflow
-
Compare the Acceleration and Containment strategies for supporting user computing, and provide a rationale for why a firm might choose one or the other.
-
1. Use transformations of the graph of the parent function f(x)=1 to graph g(x)= 1 --2. X X-3
-
One technique for limiting fault current is to place reactance in series with the generators. Such reactance can be modeled in PowerWorld Simulator by increasing the value of the generator's positive...
-
illustration of how you would address employee turnover issues from an HR perspective. In your illustration, do the following: Describe the company you identified and the issues it experienced with...
-
1. A vertical deepwater Gulf-of-Mexico well was drilled with a floating platform. The thickness of the water column was 1.3 miles and the well reached a total depth of 6.3 miles below sea level. The...
-
Suppose you have been hired as a consultant by Stevens Steel. Stevens Steel has prepared the following estimates for a long-term project it is considering. The initial investment is $35,510, and the...
-
Using either a tape measure or a ruler, make a measurement of your height in metres. Give your answer to three decimal places (i.e. to the nearest millimetre). Does this question make sense to...
-
What mechanisms influence the evolution of group cohesion, solidarity, and collective identity over time?
-
"The influence of employee motivation and engagement on organizational performance" Construct a literature review for above research topic Search for relevant literature. Evaluate sources. Identify...
-
With regard to DuPont analysis, the asset turnover ratio measures: the profitability of the company's sales. the liquidity of the company's assets. the impact of debt financing on a company's...
-
Research an article from an online source, such as The Economist, Wall Street Journal, Journal of Economic Perspectives, American Journal of Agricultural Economics, or another academic journal. The...
-
Ray and Maria Gomez have been married 3 years. They live at 1610 Quince Ave., McAllen, TX 78701. Ray works for Palm Oil Corporation and Maria works for the City of McAllen. Maria's Social Security...
-
In 2012, Michael has net short-term capital losses of $2,000, a net long-term capital loss of $45,000, and other ordinary taxable income of $45,000. a. Calculate the amount of Michael's deduction for...
-
Amy is a calendar-year taxpayer reporting on the cash basis. Please indicate how she should treat the following items for 2012: a. She makes a deductible contribution to an IRA on April 15,...
-
Napier Company's standard labor cost of producing one unit of Product DD is 3.9 hours at the rate of \($12.00\) per hour. During August, 40,800 hours of labor are incurred at a cost of \($12.10\) per...
-
The follovving direct materials and direct labor data pertain to the operations of Juan Manufacturing Company for the month of August Instructions (a) Compute the total, price, and quantity variances...
-
Kayjay Inc., which produces a single product, has prepared the following standard cost sheet for one unit of the product. Direct materials (8 pounds at \($2.50\) per pound) \($20.00\) Direct labor (3...
![Mobile App Logo](https://dsd5zvtm8ll6.cloudfront.net/includes/images/mobile/finalLogo.png)
Study smarter with the SolutionInn App