ProjektGraph/graph/Vertex.java
2024-07-01 17:08:11 +02:00

49 lines
779 B
Java

package graph;
public abstract class Vertex {
// ATTRIBUTE
private String name;
private int xCoordinate;
private int yCoordinate;
// KONSTRUKTOREN
public Vertex() {
this.name = "";
}
public Vertex(String s) {
this.name = s;
}
// GET-ER
public String getName() {
return this.name;
}
public int getXCoordinate(){
return this.xCoordinate;
}
public int getYCoordinate(){
return this.yCoordinate;
}
// SET-ER
public void setName(String s) {
this.name = s;
}
public void setXCoordinate(int xCoordinate){
this.xCoordinate=xCoordinate;
}
public void setYCoordinate(int yCoordinate){
this.yCoordinate=yCoordinate;
}
}