-1

1. A PROGRAM THAT PROVIDES THE INTERSECTION COORDINATES OF TWO LINES GIVEN THE COORDINATES OF LINE A AND LINE B.

2. A PROGRAM THAT WILL BE ABLE TO CALCULATE THE GRADIENT/SLOPE OF A LINE GIVEN TWO POINTS.

i want to know what i am doing to do, how to even start it i have no ideas can u pls explain to me how to go about it

NB:
i learn best by doing so i will be glad if u can add example codes to it

5
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by jon.kiparsky
1

You best learn by trying and failing. So why don't you start with coding? Besides it is your assignment and you need to prove you learn, not us...
Second question is more easier so start with that.

0

I think you only need math expressions.The rest is basic java.Also check java.lang.Math

Edited by forhacksf: n/a

0

I suggest you first draw a picture, then figure out what numbers you need, then replicate the picture in java. then expand it to take user input and still calculate the correct answer.

1

i learn best by doing so i will be glad if u can add example codes to it

If you learn best by doing, do.

sirlink's advice is good: solve the problem for a specific case, say (1,1) and (4,4). Then solve for (x1, y1) and (x2, y2).
Also, it's good to start by getting a handle on exactly what you're looking at. So for the first problem, what defines a line? Lines don't have "coordinates", so think of the simplest form of a line for this problem and solve for that, then extend that solution.

Votes + Comments
those who want to do, do :)
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.