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

Recommended Answers

All 4 Replies

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.

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

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.

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.

commented: those who want to do, do :) +10
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.