import java.io.*;

public class klasse1 {

 	private static void pause() {
    try {
      System.in.read();
    }
    catch (IOException e) {
    }
	}

	private	static void	test1() {
		px mypunkt = new px(111);
		System.out.println("x: "+mypunkt.getx() );
		System.out.println(mypunkt);
	}
	private	static void	test2() {
		pxy mypunkt = new pxy(111,44);
		System.out.println(mypunkt);
	}

  public static void main(String[] args) {
		test2();
		pause();
  }

}



class px {
	private int x;

	public px(int x) {
    System.out.println("in px");
		this.x=x;
	}



    // get Methode für Variable px
    
  public int getx() {
		return x;
  }   //  getpx

    // set Methode für Variable px
  public void setx (int value) {
    x=value;
  }   //  setpx

	public String toString() {
		return "x: "
   +Integer.toString(x);
			// x+""
	}

}


class pxy extends px {
	private int y;

	public pxy(int x, int y) {
		super(x);
    System.out.println("in pxy");
		this.y=y;
	}



    // get Methode für Variable px
    
  public int gety() {
		return y;
  }   //  getpy

    // set Methode für Variable px
  public void sety (int value) {
    y=value;
  }   //  setpx

	public String toString() {
		return "y: "
    +Integer.toString(y)+"  "+super.toString();
			// x+""
	}

}
