-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPoint.java
More file actions
54 lines (40 loc) · 1021 Bytes
/
Copy pathPoint.java
File metadata and controls
54 lines (40 loc) · 1021 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
/* Point.java
* Matthew Pechen-Berg and Peter Jang
* January 17th, 2020
* Class that helps organize pairs of x and y values
*/
public class Point {
//Declare private variables
private double x;
private double y;
//Constructor for the Point class
Point(double x, double y) {
//Required for constructor
this.x = x;
this.y = y;
}//end of Point constructor
/** Gets the x value
*@return the x value
*/
public double getX() {
return this.x;
}//end of getX()
/** Sets the x value
*@param newX double the new x value
*/
public void setX(double newX) {
this.x = newX;
}//end of setX()
/** Gets the y value
*@return the y value
*/
public double getY() {
return this.y;
}//end of getY()
/** Sets the y value
*@param newY double the new y value
*/
public void setY(double newY) {
this.y = newY;
}//end of setY()
}//end of Point class