diff --git a/Personal/SimpleOOPExample/src/Coords.java b/Personal/SimpleOOPExample/src/Coordinates.java similarity index 81% rename from Personal/SimpleOOPExample/src/Coords.java rename to Personal/SimpleOOPExample/src/Coordinates.java index 2f594f4..d7fb997 100644 --- a/Personal/SimpleOOPExample/src/Coords.java +++ b/Personal/SimpleOOPExample/src/Coordinates.java @@ -1,8 +1,8 @@ -public class Coords { +public class Coordinates { private int x; private int y; - public Coords(int x, int y) { + public Coordinates(int x, int y) { this.x = x; this.y = y; } diff --git a/Personal/SimpleOOPExample/src/Line.java b/Personal/SimpleOOPExample/src/Line.java index d8c233f..17937c4 100644 --- a/Personal/SimpleOOPExample/src/Line.java +++ b/Personal/SimpleOOPExample/src/Line.java @@ -7,7 +7,7 @@ public class Line { private int y1; private int y2; - public Line(Coords coords1, Coords coords2) { + public Line(Coordinates coords1, Coordinates coords2) { this.x1 = coords1.getX(); this.y1 = coords1.getY(); this.x2 = coords2.getX(); diff --git a/Personal/SimpleOOPExample/src/Main.java b/Personal/SimpleOOPExample/src/Main.java index 8aa3052..06b7622 100644 --- a/Personal/SimpleOOPExample/src/Main.java +++ b/Personal/SimpleOOPExample/src/Main.java @@ -1,12 +1,12 @@ public class Main { public static void main(String[] args) throws Exception { - Coords p1 = new Coords(4, 16); - Coords p2 = new Coords(2, 8); + Coordinates coordinate1 = new Coordinates(4, 16); + Coordinates coordinate2 = new Coordinates(2, 8); - Line myLine = new Line(p1, p2); + Line line = new Line(coordinate1, coordinate2); - myLine.calculateGradient(); - myLine.calculateIntercept(); - myLine.displayEquation(); + line.calculateGradient(); + line.calculateIntercept(); + line.displayEquation(); } }