Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help! Project must be used without import java.util.*; . Slopelntercept.java needed that takes the x and y coordinates of two points as doubles Requirements:

Please help! Project must be used without import java.util.*; image text in transcribed
image text in transcribed
. Slopelntercept.java needed that takes the x and y coordinates of two points as doubles Requirements: A program is and calculates the slope (if defined) of the line defined by the two points. The slope is only defined if the two x coordinates are not equal. If the slope is defined, the program calculates and prints the Y intercept and then further, if the slope is not 0, it calculates and prints the X intercept 2) and the Y and X intercepts are as Design: The equations for finding the slope (where xl follows: y2-y1 x2-x1 slope where x1 x2 = yl intercept-yl-slope * x1 ylntercept x!intercept =-1 * where slope 0; i.e.,y1 y2 Three examples of program output for the indicated input values are show below (you may replace everything in italics with your own words if desired) Example #1 Line number out Enter the Xand Ycoordinates of starting point x1=3 y1 = 1 x2 = 4 y2 = 2 Enter the X and Y coordinates of ending point Slope: 1.0 Y intercept: -2.0 X intercept: 2.0 Note that lines 2, 3, 5, and 6 begin with tab, which is set to three spaces in jGRASP. Below is an example where slope is undefined

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

PostgreSQL 10 High Performance Expert Techniques For Query Optimization High Availability And Efficient Database Maintenance

Authors: Ibrar Ahmed ,Gregory Smith ,Enrico Pirozzi

3rd Edition

1788474481, 978-1788474481

More Books

Students also viewed these Databases questions