Merge branch 'master' of https://www.github.com/sgoudham/Learning-Java
commit
1e2fcdf005
@ -1,8 +1,8 @@
|
|||||||
public class Coords {
|
public class Coordinates {
|
||||||
private int x;
|
private int x;
|
||||||
private int y;
|
private int y;
|
||||||
|
|
||||||
public Coords(int x, int y) {
|
public Coordinates(int x, int y) {
|
||||||
this.x = x;
|
this.x = x;
|
||||||
this.y = y;
|
this.y = y;
|
||||||
}
|
}
|
@ -1,12 +1,12 @@
|
|||||||
public class Main {
|
public class Main {
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
Coords p1 = new Coords(4, 16);
|
Coordinates coordinate1 = new Coordinates(4, 16);
|
||||||
Coords p2 = new Coords(2, 8);
|
Coordinates coordinate2 = new Coordinates(2, 8);
|
||||||
|
|
||||||
Line myLine = new Line(p1, p2);
|
Line line = new Line(coordinate1, coordinate2);
|
||||||
|
|
||||||
myLine.calculateGradient();
|
line.calculateGradient();
|
||||||
myLine.calculateIntercept();
|
line.calculateIntercept();
|
||||||
myLine.displayEquation();
|
line.displayEquation();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue