Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public abstract class Point {
- private int x;
- private int y;
- private int z;
- public Point() {
- x = 3;
- y = 4;
- z = 5;
- }
- public Point(int x, int y, int z) {
- setX(x);
- setY(y);
- setZ(z);
- }
- public void setX(int x) {
- this.x = x;
- }
- public void setY(int y) {
- this.y = y;
- }
- public void setZ(int z) {
- this.z = z;
- }
- public int getX() {
- return x;
- }
- public int getY() {
- return y;
- }
- public int getZ() {
- return z;
- }
- public String toString() {
- return "(" + x + ", " + z + ", " + y + ")";
- }
- public abstract int calcArea();
- public abstract int calcVolume();
- public abstract DrawFigure drawFigure();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement