Question: Lets say you have a line y = 0.5x + 2.0, where 0.5 is the slope, and 2.0 is the y-intercept. Using this linear equation,

Let’s say you have a line y = 0.5x + 2.0, where 0.5 is the slope, and 2.0 is the y-intercept. Using this linear equation, we can find the (x,y) coordinates on this line. 

Create a new class file called LinearEquation.java and create a main() container. Find the y coordinate for the corresponding x values: 

x = -1.0 x = 0.0 x = 1.0 x = 2.0

Make sure you use a data type that represents decimal numbers.

x = -1.0 x = 0.0 x = 1.0 x = 2.0

Step by Step Solution

3.47 Rating (150 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To solve this you will need to create a Java class that will calculate the yvalue for given xvalues ... View full answer

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 Introduction Java Program Questions!