Hello Everyone!
I am new to Java and this site as well, I am in a computer science course at my university and we are being asked to solve math problems. I know my code is not correct, however our professor was not too clear on how to write it.. this is what I have so far
import java.awt.Point;
public class AvogtA03 {
public static void main (String[] args) {
double X1 = 7;
double X2 = 0;
double y1 = 28;
double y2 = 28;
double distanceOne = Math.sqrt(((X2-X1)*(X2-X1))+((y2-y1)*(y2-y1)));
double slopeOne = (y2-y1) / (X2-X1)
System.out.println("Distance One = " + distanceOne) ;
System.out.println("Slope One = " + slopeOne) ;
}
}
I am solving for distance and slope of two points, If you do give me the answer to correcting my code please explain why so I could take note for future reference. Thank you so much for all of your help.