Skip to content

Instantly share code, notes, and snippets.

@uncoded-ro
Created January 12, 2020 07:20
Show Gist options
  • Save uncoded-ro/2874563c0d8012309fc852dd92a0f97e to your computer and use it in GitHub Desktop.
Save uncoded-ro/2874563c0d8012309fc852dd92a0f97e to your computer and use it in GitHub Desktop.
package ro.virtualcampus.obiectgrafic;
public abstract class ObiectGrafic {
protected double x, y;
public ObiectGrafic() {
x = 0;
y = 0;
}
public ObiectGrafic(double x, double y) {
this.x = x;
this.y = y;
}
@Override
public String toString() {
return "ObiectGrafic [x=" + x + ", y=" + y + "]";
}
public abstract double aria();
public abstract double perimetrul();
public double getX() {
return x;
}
public void setX(double x) {
this.x = x;
}
public double getY() {
return y;
}
public void setY(double y) {
this.y = y;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment