greatly appreciate help!
regards,
Victor M. Pereira
greatly appreciate help!
tito ortizz wrote:this is suppose to be the line. i i thought since i declared the as parameters then i could say they were some number. i was going for the point slope formula.
greatly appreciate help!
tito ortizz wrote:i was thinking the same thing, but i needed to only use 4 variable so i thought i would use the array to run them twice then the result would give me the intersection.
how can i fix this problem?
and the if and looping are wrong? why?
greatly appreciate help!
tito ortizz wrote:
Write a program block to compute interaction point between given two lines. Each line is represented in a parametric form –
Y = mX + c
Where m is slop of the line while c is y intercept. In turn your function takes four parameters, m1, c1, m2, and c2 as floating point numbers. The program computes the intersection point and returns its result to the caller. Once completed, perform unit testing of your routine using the method covered in the lab. You must select input values for the unit test using following methods –
·Equivalent partitioning
·Basic path coverage
Provide your analysis for selecting input values in a separate document.
greatly appreciate help!
fred perez wrote:yea, i know that you have to set each point slope form to each other:
0 =(m1 - m2)x + (c1 - c2)
array[0] =(m1 - m2)x + (c1 - c2)
array[1] =(m1 - m2)y + (c1 - c2)
regards,
Victor M. Pereira
greatly appreciate help!
regards,
Victor M. Pereira
fred perez wrote:
{ y1 = m1 + c1;
y2 = m2 + c2;
y2 = y1;
greatly appreciate help!
fred perez wrote:in math term: if i had an equation solve for a single variable, and then plug it in to the found variable and solve for the other one. then use those found and plug them into the other. but they are all variable.
i could move everything onto one side but outside of that, what else can i do?
greatly appreciate help!
fred perez wrote:is this how you put the equ. equal to each other?
y1 = m1 +c1
y2 = m2 + c2
Point intersection(int m1, int m2, int c1, int c2){
int x = 0;
int y = 0;
x = (c2 - c1) / (m1 - m2);
y = m2 * x + c2;
return new Point(x,y);
}
greatly appreciate help!
fred perez wrote:it compile okay, but when i tried to run it, it said i need a main class so i made one and it said it was missing a symbol "; "
greatly appreciate help!
fred perez wrote:please help me with this code. i have been at this for the last 2 day and i am having nightmares. is this code right?
greatly appreciate help!
fred perez wrote:i toke out the system.out.println
and ran a junit test and it gave me a bunch of error that i cant not understand. what i am suppose to do with that? it failed, now what?
Joanne
Don't get me started about those stupid light bulbs. |