2024-06-15 14:48:28 +00:00
|
|
|
package graph;
|
|
|
|
|
|
|
|
public abstract class Vertex {
|
|
|
|
|
2024-06-15 19:55:30 +00:00
|
|
|
// ATTRIBUTE
|
|
|
|
|
2024-06-15 14:48:28 +00:00
|
|
|
private String name;
|
2024-07-01 15:08:11 +00:00
|
|
|
private int xCoordinate;
|
|
|
|
private int yCoordinate;
|
2024-06-15 14:48:28 +00:00
|
|
|
|
2024-06-15 19:55:30 +00:00
|
|
|
|
|
|
|
// KONSTRUKTOREN
|
|
|
|
|
2024-06-15 14:48:28 +00:00
|
|
|
public Vertex() {
|
|
|
|
this.name = "";
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Vertex(String s) {
|
|
|
|
this.name = s;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-06-15 19:55:30 +00:00
|
|
|
// GET-ER
|
|
|
|
|
2024-06-15 14:48:28 +00:00
|
|
|
public String getName() {
|
|
|
|
return this.name;
|
|
|
|
}
|
2024-07-01 15:08:11 +00:00
|
|
|
public int getXCoordinate(){
|
|
|
|
return this.xCoordinate;
|
|
|
|
}
|
|
|
|
public int getYCoordinate(){
|
|
|
|
return this.yCoordinate;
|
|
|
|
}
|
2024-06-25 15:18:34 +00:00
|
|
|
|
2024-06-15 19:55:30 +00:00
|
|
|
// SET-ER
|
|
|
|
|
2024-06-15 14:48:28 +00:00
|
|
|
public void setName(String s) {
|
|
|
|
this.name = s;
|
|
|
|
}
|
2024-07-01 15:08:11 +00:00
|
|
|
public void setXCoordinate(int xCoordinate){
|
|
|
|
this.xCoordinate=xCoordinate;
|
|
|
|
}
|
|
|
|
public void setYCoordinate(int yCoordinate){
|
|
|
|
this.yCoordinate=yCoordinate;
|
|
|
|
}
|
2024-06-25 15:18:34 +00:00
|
|
|
|
2024-06-15 14:48:28 +00:00
|
|
|
}
|