-
-
Save uncoded-ro/2874563c0d8012309fc852dd92a0f97e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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